Skip to content

Commit

Permalink
Merge pull request #76 from mezzarobba/flint3
Browse files Browse the repository at this point in the history
Make msolve build with flint 3 alpha
  • Loading branch information
mohabsafey committed Sep 15, 2023
2 parents 19233e2 + fe73057 commit 0fb562f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/fglm/berlekamp_massey.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
*/

#include <stdlib.h>
#if __FLINT_VERSION >= 3
# include <flint/nmod.h>
#endif
//#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 0fb562f

Please sign in to comment.