Skip to content

Commit

Permalink
Make msolve build with flint3
Browse files Browse the repository at this point in the history
  • Loading branch information
mezzarobba committed Aug 24, 2023
1 parent 22620d4 commit 49d9e7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/fglm/berlekamp_massey.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

#include <stdlib.h>
#include <flint/nmod.h>
//#include "nmod_poly.h"
//#include "mpn_extras.h"

Expand Down
7 changes: 5 additions & 2 deletions src/fglm/data_fglm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <flint/mpn_extras.h>
#include <flint/nmod_poly.h>
#include <flint/nmod_poly_factor.h>
#include <flint/ulong_extras.h>


typedef uint32_t szmat_t;
Expand Down Expand Up @@ -299,9 +300,11 @@ static inline void nmod_poly_set_prime(nmod_poly_t poly,
mp_limb_t ninv = n_preinvert_limb(prime);
poly->mod.n = prime;
poly->mod.ninv = ninv;
#if __FLINT_VERSION < 3
count_leading_zeros(poly->mod.norm, prime);
/* poly->mod.norm = flint_clz(prime); */

#else
poly->mod.norm = flint_clz(prime);
#endif
}

static inline void fglm_param_set_prime(param_t *param, mp_limb_t prime){
Expand Down

0 comments on commit 49d9e7b

Please sign in to comment.