Macaulay2 Engine
Loading...
Searching...
No Matches
engine.cpp
Go to the documentation of this file.
1// Copyright 1994-2020 by Michael E. Stillman
2
37
38#include "interface/random.h"
39#include "aring-glue.hpp" // for initializeRationalRing
40#include "interface/m2-types.h"
41//#include "engine-exports.h" // for M2_tostring, M2_string
42#include "error.h" // for error_message
43#include "hash.hpp" // for MutableEngineObject
44#include "mem.hpp" // for doubles, doubling_stash
45#include "poly.hpp" // for PolyRing
46#include "style.hpp" // for GEOHEAP_SIZE
47
49
50// unsigned long mutable_object::next_hash_sequence_number = 1000;
51// long object::next_hash_sequence_number = -7;
52
53const int heap_size[GEOHEAP_SIZE] = {4,
54 16,
55 64,
56 256,
57 1024,
58 4096,
59 16384,
60 65536,
61 262144,
62 1048576,
63 4194304,
64 16777216,
65 67108864,
66 268435456,
67 1073741824};
68
69static bool initialized = false;
70
75extern "C" // TODO: remove when this function is in e/interface
77{
78 if (initialized) return;
79 initialized = true;
81
82 // This next routine initializes: globalZZ, trivial_monoid, trivial_poly_ring,
83 // and makes sure their degree rings are interconnected.
85
87
89}
90
98
100
101// Local Variables:
102// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
103// indent-tabs-mode: nil
104// End:
void initializeRationalRing()
Definition aring.cpp:26
ConcreteRing<RingType> — the templated bridge between aring and the legacy Ring API.
static unsigned int mNextMutableHashValue
Definition hash.hpp:100
static const PolyRing * get_trivial_poly_ring()
Definition poly.cpp:35
void IM2_initialize()
Definition engine.cpp:76
const int heap_size[GEOHEAP_SIZE]
Definition engine.cpp:53
static bool initialized
Definition engine.cpp:69
M2_string IM2_last_error_message()
Definition engine.cpp:99
const char * error_message()
Definition error.c:49
Engine error-reporting primitives: ERROR, INTERNAL_ERROR, error, error_message.
EngineObject / MutableEngineObject — shared bases that supply the hash an M2 interpreter object expec...
M2_string M2_tostring(const char *s)
Definition m2-types.cpp:31
Engine-to-interpreter type vocabulary across the C++ / .dd boundary.
doubling_stash * doubles
Definition mem.cpp:14
stash and doubling_stash — legacy size-class allocator interfaces, now stubbed to plain GC allocation...
Concrete commutative PolyRing — standard polynomial ring inheriting from PolyRingFlat.
void rawRandomInitialize()
Definition random.cpp:21
Engine-boundary C API for the engine's PRNG and rational / real / complex random draws.
#define GEOHEAP_SIZE
Definition style.hpp:46
Engine-wide stylistic constants: LT / EQ / GT codes, INTSIZE, GEOHEAP_SIZE.