14#include <M2/gc-include.h>
46 p = M2_debug_to_inner(
p);
51 fprintf(stderr,
"\n -- removing monomial ideal %d at %p\n", nremoved.load(),
53 G->remove_MonomialIdeal();
65 "\n -- registering monomial ideal %d at %p\n",
104 p = M2_debug_to_inner(
p);
109 fprintf(stderr,
"\n --removing gb %d at %p\n", nremoved.load(),
G);
115 GC_REGISTER_FINALIZER_IGNORE_SELF(M2_debug_to_outer(
G),
remove_gb, 0, 0, 0);
117 GC_REGISTER_FINALIZER_IGNORE_SELF(
G ,
remove_gb,
nullptr,
nullptr,
nullptr);
127 stderr,
"\n -- registering gb %d at %p\n", nfinalized.load(),
136 p = M2_debug_to_inner(
p);
141 fprintf(stderr,
"\n -- removing res %d at %p\n", nremoved.load(),
G);
147 GC_REGISTER_FINALIZER(M2_debug_to_outer(
G),
remove_res, 0, 0, 0);
149 GC_REGISTER_FINALIZER(
G ,
remove_res,
nullptr,
nullptr,
nullptr);
154 stderr,
"\n -- registering res %d at %p\n", nfinalized.load(),
162 p = M2_debug_to_inner(
p);
167 fprintf(stderr,
"\n -- removing SchreyerOrder %d at %p\n", nremoved.load(),
181 "\n -- registering SchreyerOrder %d at %p\n",
191 p = M2_debug_to_inner(
p);
196 fprintf(stderr,
"\n -- removing mutable matrix %d at %p\n", nremoved.load(),
202 if (
G ==
nullptr)
return nullptr;
211 "\n -- registering mutable matrix %d at %p\n",
229 o <<
"Finalizations of new resolutions:" <<
newline;
230 o <<
"# of res objects constructed/deconstructed=(" <<
nres <<
","
248 o <<
"# of monomial ideals registered/finalized=("
253 o <<
"# of mutable matrices registered/finalized=("
258 o <<
"# of polynomial rings registered/finalized=("
270 o <<
"Internal error: [unprintable memory display]";
base class for Groebner basis computations.
Engine-side monomial ideal: a decision tree of Nmi_nodes storing the (typically minimal) generators b...
Abstract base class for mutable matrices over an arbitrary engine Ring, the in-place counterpart of t...
Abstract base for the engine's polynomial-ring hierarchy.
Base class for free resolution computation classes.
Per-component tie-breaker data for a Schreyer monomial order on a FreeModule.
static void stats(buffer &o)
GBComputation — abstract base of every Groebner-basis algorithm in the engine.
ResolutionComputation — abstract base for every free-resolution algorithm in the engine.
Engine-wide include prelude — a single point of truth for portability shims.
void intern_GB(GBComputation *G)
static volatile std::atomic< int > monideals_nremoved
void remove_MutableMatrix(void *p, void *cd)
static volatile std::atomic< int > monideals_nfinalized
static volatile std::atomic< int > gbs_nremoved
void remove_SchreyerOrder(void *p, void *cd)
void intern_monideal(MonomialIdeal *G)
MutableMatrix * internMutableMatrix(MutableMatrix *G)
void remove_monideal(void *p, void *cd)
static volatile std::atomic< int > gbs_nfinalized
void intern_polyring(const PolynomialRing *G)
void intern_SchreyerOrder(SchreyerOrder *G)
void intern_res(ResolutionComputation *G)
static volatile std::atomic< int > polyrings_nfinalized
static volatile std::atomic< int > schorder_nremoved
static volatile std::atomic< int > polyrings_nremoved
void remove_res(void *p, void *cd)
void remove_gb(void *p, void *cd)
static volatile std::atomic< int > res_nremoved
static volatile std::atomic< int > res_nfinalized
static volatile std::atomic< int > comp_nremoved
static volatile std::atomic< int > comp_nfinalized
static volatile std::atomic< int > schorder_nfinalized
static volatile std::atomic< int > mutablematrices_nremoved
static volatile std::atomic< int > mutablematrices_nfinalized
intern_* helpers that register long-lived engine objects with bdwgc finalisers.
MutableMatrix — abstract base of every mutable matrix the engine hands across the boundary.
MonomialIdeal — exponent-vector-only representation of an ideal generated by monomials.
SchreyerOrder — per-basis-element data backing the Schreyer order on a free module.