Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/crt/mpq_reconstruct.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
**/

#include <gmp.h>
#include "../msolve/msolve-data.h"
#include "../msolve/streams.h"

/* #define ROT(u,v,t) \ */
Expand Down
7 changes: 7 additions & 0 deletions src/crt/mpz_CRT_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ This implementation is a (very) slight modification of the functions in FLINT.

**/

/* Force the real FLINT ulong_extras.h to be processed first: it and our
* local ulong_extras.h below share the ULONG_EXTRAS_H include guard, so
* whichever is seen first "wins". Without this, our copy only works by
* accident of #include order elsewhere pulling in FLINT's real header
* first; if it doesn't, our copy's own "#include
* ulong_extras/ll_mod_preinv.c" fails since that file isn't vendored here. */
#include <flint/ulong_extras.h>
#include "ulong_extras.h"
#include "../msolve/streams.h"

Expand Down
1 change: 1 addition & 0 deletions src/msolve/hilbert.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "../fglm/data_fglm.c"
#include "../fglm/libfglm.h"
#include "../neogb/meta_data.h"
#include "msolve-data.h"
#include "streams.h"
#define REDUCTION_ALLINONE 1

Expand Down
1 change: 1 addition & 0 deletions src/msolve/iofiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "getdelim.h"

#include "msolve-data.h"
#include "streams.h"

static inline void store_exponent(const char *term, data_gens_ff_t *gens, int64_t pos)
Expand Down
12 changes: 12 additions & 0 deletions src/msolve/libmsolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
#include "msolve-data.h"
#include "msolve-data.c"
#include "streams.h"

/* iofiles.c, hilbert.c, primes.c and msolve.c are included below as a single
* translation unit and some of them call into functions defined further
* down that list (hilbert.c uses iofiles.c's display_monomial_full;
* msolve.c/lifting-gb.c, included via msolve.c, use primes.c's
* next_prime). Forward-declaring them here makes the #include order below
* cosmetic instead of load-bearing. */
static inline int32_t display_monomial_full(FILE *file, const int nv,
char **vnames,
int64_t pos, int32_t *bexp);
uint32_t next_prime(uint32_t n);

#include "iofiles.c"
#include "hilbert.c"
#include "primes.c"
Expand Down
2 changes: 2 additions & 0 deletions src/msolve/msolve-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* Christian Eder
* Mohab Safey El Din */

#include "msolve-data.h"

static void initialize_mstrace(mstrace_t msd, md_t *st, bs_t *bs){
msd->lp = (primes_t *)calloc(st->nthrds, sizeof(primes_t));

Expand Down
30 changes: 30 additions & 0 deletions src/msolve/msolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,36 @@

#include "msolve.h"
#include "streams.h"

/* duplicate.c, linear.c, lifting.c and lifting-gb.c are included below as a
* single translation unit and some of them call into functions defined
* further down that list (lifting.c uses linear.c's *_linear_forms helpers,
* lifting-gb.c uses lifting.c's *_rrec_data and duplicate.c's
* duplicate_data_mthread_gbtrace). Forward-declaring them here makes the
* #include order below cosmetic instead of load-bearing, so a formatter (or
* anyone) resorting those lines can no longer break the build. */
static inline void duplicate_data_mthread_gbtrace(int nthreads,
bs_t *bs,
md_t *st,
int32_t *num_gb,
int32_t **leadmons_ori,
int32_t **leadmons_current,
trace_t **btrace);

static inline mpz_t *allocate_crt_linear_forms(int nlins, int nv,
uint32_t **lineqs_ptr);
static inline mpz_t *allocate_mpq_linear_forms(int nlins, int nv);
static inline void crt_linear_forms_clear(mpz_t *crt_linear_forms, int nlins,
int nv);
static inline void mpq_linear_forms_clear(mpz_t *mpq_linear_forms, int nlins,
int nv);
static inline mpz_t *mpz_linear_forms_allocate(int nlins, int nv);
static inline void mpz_linear_forms_clear(mpz_t *mpz_linear_forms, int nlins,
int nv);

void initialize_rrec_data(rrec_data_t recdata);
void free_rrec_data(rrec_data_t recdata);

#include "duplicate.c"
#include "linear.c"
#include "lifting.c"
Expand Down