Skip to content

Commit

Permalink
Merge pull request #2027 from dimpase/c99_and_I
Browse files Browse the repository at this point in the history
ensure C99 compliance in headers, as 'I' is reserved
  • Loading branch information
albinahlback authored Jun 20, 2024
2 parents 1d56625 + bb541cc commit b579cdd
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/fft_small.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ typedef struct {

typedef mpn_ctx_struct mpn_ctx_t[1];

void _convert_block(ulong* Xs, sd_fft_ctx_struct* Rffts, double* d, ulong dstride, ulong np, ulong I);
void _convert_block(ulong* Xs, sd_fft_ctx_struct* Rffts, double* d, ulong dstride, ulong np, ulong Iv);
ulong flint_mpn_nbits(const ulong* a, ulong an);
int flint_mpn_cmp_ui_2exp(const ulong* a, ulong an, ulong b, ulong e);
unsigned char flint_mpn_add_inplace_c(ulong* z, ulong zn, ulong* a, ulong an, unsigned char cf);
Expand Down
8 changes: 4 additions & 4 deletions src/fmpz_mod_mpoly_factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1201,15 +1201,15 @@ typedef struct {
typedef fmpz_mod_mpoly_pfrac_struct fmpz_mod_mpoly_pfrac_t[1];


int fmpz_mod_mpoly_pfrac_init(fmpz_mod_mpoly_pfrac_t I,
int fmpz_mod_mpoly_pfrac_init(fmpz_mod_mpoly_pfrac_t Iv,
flint_bitcnt_t bits, slong l, slong r, const fmpz_mod_mpoly_struct * betas,
const fmpz * alpha, const fmpz_mod_mpoly_ctx_t ctx);

void fmpz_mod_mpoly_pfrac_clear(fmpz_mod_mpoly_pfrac_t I,
void fmpz_mod_mpoly_pfrac_clear(fmpz_mod_mpoly_pfrac_t Iv,
const fmpz_mod_mpoly_ctx_t ctx);

int fmpz_mod_mpoly_pfrac(slong r, fmpz_mod_mpoly_t t, const slong * deg,
fmpz_mod_mpoly_pfrac_t I, const fmpz_mod_mpoly_ctx_t ctx);
fmpz_mod_mpoly_pfrac_t Iv, const fmpz_mod_mpoly_ctx_t ctx);

int fmpz_mod_mpoly_hlift(slong m, fmpz_mod_mpoly_struct * f, slong r,
const fmpz * alpha, const fmpz_mod_mpoly_t A, const slong * degs,
Expand Down Expand Up @@ -1288,7 +1288,7 @@ int fmpz_mod_mpolyn_gcd_brown_smprime(
fmpz_mod_mpolyn_t B,
slong var,
const fmpz_mod_mpoly_ctx_t ctx,
const mpoly_gcd_info_t I,
const mpoly_gcd_info_t Iv,
fmpz_mod_poly_polyun_mpolyn_stack_t St);

int fmpz_mod_mpolyl_gcdp_zippel(
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mpoly.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ void fmpz_mpoly_vec_randtest_not_zero(fmpz_mpoly_vec_t vec, flint_rand_t state,

void fmpz_mpoly_spoly(fmpz_mpoly_t res, const fmpz_mpoly_t f, const fmpz_mpoly_t g, const fmpz_mpoly_ctx_t ctx);
void fmpz_mpoly_vec_set_primitive_unique(fmpz_mpoly_vec_t G, const fmpz_mpoly_vec_t F, const fmpz_mpoly_ctx_t ctx);
void fmpz_mpoly_reduction_primitive_part(fmpz_mpoly_t res, const fmpz_mpoly_t f, const fmpz_mpoly_vec_t I, const fmpz_mpoly_ctx_t ctx);
void fmpz_mpoly_reduction_primitive_part(fmpz_mpoly_t res, const fmpz_mpoly_t f, const fmpz_mpoly_vec_t Iv, const fmpz_mpoly_ctx_t ctx);
int fmpz_mpoly_vec_is_groebner(const fmpz_mpoly_vec_t G, const fmpz_mpoly_vec_t F, const fmpz_mpoly_ctx_t ctx);
void fmpz_mpoly_buchberger_naive(fmpz_mpoly_vec_t G, const fmpz_mpoly_vec_t F, const fmpz_mpoly_ctx_t ctx);
int fmpz_mpoly_buchberger_naive_with_limits(fmpz_mpoly_vec_t G, const fmpz_mpoly_vec_t F,
Expand Down
18 changes: 9 additions & 9 deletions src/fmpz_mpoly_factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ void fmpz_mpoly_from_mpolyl_perm_inflate(fmpz_mpoly_t A,

int fmpz_mpolyl_gcd_brown(fmpz_mpoly_t G,
fmpz_mpoly_t Abar, fmpz_mpoly_t Bbar, fmpz_mpoly_t A, fmpz_mpoly_t B,
const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t I);
const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t Iv);

int fmpz_mpolyl_gcd_brown_threaded_pool(fmpz_mpoly_t G,
fmpz_mpoly_t Abar, fmpz_mpoly_t Bbar, fmpz_mpoly_t A, fmpz_mpoly_t B,
const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t I,
const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t Iv,
const thread_pool_handle * handles, slong num_handles);

int fmpz_mpolyl_gcd_zippel(fmpz_mpoly_t G, fmpz_mpoly_t Abar,
Expand Down Expand Up @@ -284,15 +284,15 @@ typedef struct {

typedef fmpz_poly_pfrac_struct fmpz_poly_pfrac_t[1];

void fmpz_poly_pfrac_init(fmpz_poly_pfrac_t I);
void fmpz_poly_pfrac_init(fmpz_poly_pfrac_t Iv);

void fmpz_poly_pfrac_clear(fmpz_poly_pfrac_t I);
void fmpz_poly_pfrac_clear(fmpz_poly_pfrac_t Iv);

int fmpz_poly_pfrac_precompute(fmpz_poly_pfrac_t I,
int fmpz_poly_pfrac_precompute(fmpz_poly_pfrac_t Iv,
const fmpz_poly_struct * b, slong r);

int fmpz_poly_pfrac_precomp(fmpz_poly_struct * c,
const fmpz_poly_t A, fmpz_poly_pfrac_t I);
const fmpz_poly_t A, fmpz_poly_pfrac_t Iv);

typedef struct {
flint_bitcnt_t bits;
Expand All @@ -316,15 +316,15 @@ typedef struct {

typedef fmpz_mpoly_pfrac_struct fmpz_mpoly_pfrac_t[1];

int fmpz_mpoly_pfrac_init(fmpz_mpoly_pfrac_t I, flint_bitcnt_t bits,
int fmpz_mpoly_pfrac_init(fmpz_mpoly_pfrac_t Iv, flint_bitcnt_t bits,
slong r, slong w, const fmpz_mpoly_struct * betas,
const fmpz * alpha, const fmpz_mpoly_ctx_t ctx);

void fmpz_mpoly_pfrac_clear(fmpz_mpoly_pfrac_t I,
void fmpz_mpoly_pfrac_clear(fmpz_mpoly_pfrac_t Iv,
const fmpz_mpoly_ctx_t ctx);

int fmpz_mpoly_pfrac(slong l, fmpz_mpoly_t t, const slong * degs,
fmpz_mpoly_pfrac_t I, const fmpz_mpoly_ctx_t ctx);
fmpz_mpoly_pfrac_t Iv, const fmpz_mpoly_ctx_t ctx);

int fmpz_mpoly_hlift(slong m, fmpz_mpoly_struct * f, slong r,
const fmpz * alpha, const fmpz_mpoly_t A, const slong * degs,
Expand Down
6 changes: 3 additions & 3 deletions src/fq_nmod_mpoly_factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,22 +409,22 @@ typedef fq_nmod_mpoly_pfrac_struct fq_nmod_mpoly_pfrac_t[1];


int fq_nmod_mpoly_pfrac_init(
fq_nmod_mpoly_pfrac_t I,
fq_nmod_mpoly_pfrac_t Iv,
flint_bitcnt_t bits,
slong l, slong r,
const fq_nmod_mpoly_struct * betas,
const fq_nmod_struct * alpha,
const fq_nmod_mpoly_ctx_t ctx);

void fq_nmod_mpoly_pfrac_clear(
fq_nmod_mpoly_pfrac_t I,
fq_nmod_mpoly_pfrac_t Iv,
const fq_nmod_mpoly_ctx_t ctx);

int fq_nmod_mpoly_pfrac(
slong r,
fq_nmod_mpoly_t t,
const slong * deg,
fq_nmod_mpoly_pfrac_t I,
fq_nmod_mpoly_pfrac_t Iv,
const fq_nmod_mpoly_ctx_t ctx);

int fq_nmod_mpoly_hlift(
Expand Down
6 changes: 3 additions & 3 deletions src/fq_zech_mpoly_factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,22 +633,22 @@ typedef fq_zech_mpoly_pfrac_struct fq_zech_mpoly_pfrac_t[1];


int fq_zech_mpoly_pfrac_init(
fq_zech_mpoly_pfrac_t I,
fq_zech_mpoly_pfrac_t Iv,
flint_bitcnt_t bits,
slong l, slong r,
const fq_zech_mpoly_struct * betas,
const fq_zech_struct * alpha,
const fq_zech_mpoly_ctx_t ctx);

void fq_zech_mpoly_pfrac_clear(
fq_zech_mpoly_pfrac_t I,
fq_zech_mpoly_pfrac_t Iv,
const fq_zech_mpoly_ctx_t ctx);

int fq_zech_mpoly_pfrac(
slong r,
fq_zech_mpoly_t t,
const slong * deg,
fq_zech_mpoly_pfrac_t I,
fq_zech_mpoly_pfrac_t Iv,
const fq_zech_mpoly_ctx_t ctx);

int fq_zech_mpoly_hlift(
Expand Down
18 changes: 9 additions & 9 deletions src/mpoly.h
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,9 @@ void mpoly_from_mpolyl_perm_inflate(
#define MPOLY_GCD_USE_PRS 16
#define MPOLY_GCD_USE_ALL 31

void mpoly_gcd_info_init(mpoly_gcd_info_t I, slong nvars);
void mpoly_gcd_info_init(mpoly_gcd_info_t Iv, slong nvars);

void mpoly_gcd_info_clear(mpoly_gcd_info_t I);
void mpoly_gcd_info_clear(mpoly_gcd_info_t Iv);

void mpoly_gcd_info_limits(ulong * Amax_exp, ulong * Amin_exp,
slong * Amax_exp_count, slong * Amin_exp_count,
Expand All @@ -1104,25 +1104,25 @@ void mpoly_gcd_info_stride(ulong * strides,
const ulong * Bmax_exp, const ulong * Bmin_exp,
const mpoly_ctx_t mctx);

void mpoly_gcd_info_set_perm(mpoly_gcd_info_t I,
void mpoly_gcd_info_set_perm(mpoly_gcd_info_t Iv,
slong Alength, slong Blength, const mpoly_ctx_t mctx);

slong mpoly_gcd_info_get_brown_upper_limit(const mpoly_gcd_info_t I,
slong mpoly_gcd_info_get_brown_upper_limit(const mpoly_gcd_info_t Iv,
slong var, slong bound);

void mpoly_gcd_info_measure_hensel(mpoly_gcd_info_t I,
void mpoly_gcd_info_measure_hensel(mpoly_gcd_info_t Iv,
slong Alength, slong Blength, const mpoly_ctx_t FLINT_UNUSED(mctx));

void mpoly_gcd_info_measure_brown(mpoly_gcd_info_t I,
void mpoly_gcd_info_measure_brown(mpoly_gcd_info_t Iv,
slong Alength, slong Blength, const mpoly_ctx_t FLINT_UNUSED(mctx));

void mpoly_gcd_info_measure_bma(mpoly_gcd_info_t I,
void mpoly_gcd_info_measure_bma(mpoly_gcd_info_t Iv,
slong Alength, slong Blength, const mpoly_ctx_t FLINT_UNUSED(mctx));

void mpoly_gcd_info_measure_zippel(mpoly_gcd_info_t I,
void mpoly_gcd_info_measure_zippel(mpoly_gcd_info_t Iv,
slong FLINT_UNUSED(Alength), slong FLINT_UNUSED(Blength), const mpoly_ctx_t FLINT_UNUSED(mctx));

void mpoly_gcd_info_measure_zippel2(mpoly_gcd_info_t I,
void mpoly_gcd_info_measure_zippel2(mpoly_gcd_info_t Iv,
slong FLINT_UNUSED(Alength), slong FLINT_UNUSED(Blength), const mpoly_ctx_t FLINT_UNUSED(mctx));

int mpoly_monomial_cofactors(fmpz * Abarexps, fmpz * Bbarexps,
Expand Down
4 changes: 2 additions & 2 deletions src/nmod_mpoly.h
Original file line number Diff line number Diff line change
Expand Up @@ -1288,13 +1288,13 @@ int nmod_mpolyn_gcd_brown_smprime_bivar(
int nmod_mpolyn_gcd_brown_smprime(nmod_mpolyn_t G,
nmod_mpolyn_t Abar, nmod_mpolyn_t Bbar,
nmod_mpolyn_t A, nmod_mpolyn_t B, slong var,
const nmod_mpoly_ctx_t ctx, const mpoly_gcd_info_t I,
const nmod_mpoly_ctx_t ctx, const mpoly_gcd_info_t Iv,
nmod_poly_stack_t Sp);

int nmod_mpolyn_gcd_brown_smprime_threaded_pool(nmod_mpolyn_t G,
nmod_mpolyn_t Abar, nmod_mpolyn_t Bbar,
nmod_mpolyn_t A, nmod_mpolyn_t B, slong var,
const nmod_mpoly_ctx_t ctx, const mpoly_gcd_info_t I,
const nmod_mpoly_ctx_t ctx, const mpoly_gcd_info_t Iv,
const thread_pool_handle * handles, slong num_workers);

int nmod_mpolyn_gcd_brown_lgprime(nmod_mpolyn_t G,
Expand Down
6 changes: 3 additions & 3 deletions src/nmod_mpoly_factor.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ typedef struct {
typedef nmod_mpoly_pfrac_struct nmod_mpoly_pfrac_t[1];


int nmod_mpoly_pfrac_init(nmod_mpoly_pfrac_t I, flint_bitcnt_t bits,
int nmod_mpoly_pfrac_init(nmod_mpoly_pfrac_t Iv, flint_bitcnt_t bits,
slong l, slong r, const nmod_mpoly_struct * betas,
const ulong * alpha, const nmod_mpoly_ctx_t ctx);

void nmod_mpoly_pfrac_clear(nmod_mpoly_pfrac_t I,
void nmod_mpoly_pfrac_clear(nmod_mpoly_pfrac_t Iv,
const nmod_mpoly_ctx_t ctx);

int nmod_mpoly_pfrac(slong r, nmod_mpoly_t t, const slong * deg,
nmod_mpoly_pfrac_t I, const nmod_mpoly_ctx_t ctx);
nmod_mpoly_pfrac_t Iv, const nmod_mpoly_ctx_t ctx);

int nmod_mpoly_hlift(slong m, nmod_mpoly_struct * f, slong r,
const ulong * alpha, const nmod_mpoly_t A, const slong * degs,
Expand Down

0 comments on commit b579cdd

Please sign in to comment.