|
Macaulay2 Engine
|
Shared base of the aring framework (namespace M2) that unifies the engine's coefficient rings. More...
Go to the source code of this file.
Classes | |
| class | M2::RingInterface |
| class | M2::ElementImpl< ElementType > |
| A base class for Element. More... | |
| class | M2::SimpleARing< ARing > |
| A base class for simple ARings. More... | |
| class | M2::SimpleARing< ARing >::Element |
| A wrapper class for ElementType. More... | |
| class | M2::SimpleARing< ARing >::ElementArray |
| A wrapper for an array of ElementType. More... | |
| class | M2::DummyRing |
| Placeholder aring used as a default / fallback for code paths that need an ARing-shaped object but no real arithmetic. More... | |
Namespaces | |
| namespace | M2 |
Macros | |
| #define | FLINT_RAND_INIT(x) |
| #define | FLINT_RAND_CLEAR(x) |
Enumerations | |
| enum | M2::RingID { M2::ring_example = 0 , M2::ring_ZZ , M2::ring_ZZFlint , M2::ring_QQ , M2::ring_QQFlint , M2::ring_ZZp , M2::ring_ZZpFfpack , M2::ring_ZZpFlint , M2::ring_GFM2 , M2::ring_GFFlintBig , M2::ring_GFFlintZech , M2::ring_RR , M2::ring_CC , M2::ring_RRR , M2::ring_CCC , M2::ring_RRi , M2::ring_CCi , M2::ring_tower_ZZp , M2::ring_old } |
Shared base of the aring framework (namespace M2) that unifies the engine's coefficient rings.
Declares the pieces every concrete coefficient ring builds on: the RingID enum that names each back end (ring_ZZ, ring_ZZFlint, ring_QQ / _QQFlint, ring_ZZp / _ZZpFfpack / _ZZpFlint, ring_GFM2 / _GFFlintBig / _GFFlintZech, ring_RR / _CC / _RRR / _CCC / _RRi / _CCi, ring_tower_ZZp, plus ring_old for everything still on the legacy Ring API), the empty RingInterface : our_new_delete inheritance tag that every ConcreteRing template parameter must derive from, the plain templated ElementImpl<ElementType> base that wraps a raw element with conversion operators (templated on the raw element type, not the derived class — so not CRTP), and the genuinely CRTP-typed SimpleARing<ARing> template that gives a concrete ring (e.g. CoefficientRingZZp) ready-made Element and ElementArray wrappers calling back into the derived class for init / clear / init_set. The placeholder DummyRing subclass is a fully-stubbed SimpleARing<DummyRing> used as a no-op implementation.
The aring framework coexists permanently with the older Ring API: existing engine code reads Ring*, performance-critical paths take a ARing<R> template parameter so the per-element arithmetic inlines instead of going through a virtual, and the bridges in aring-glue.hpp (vertical wrapper ConcreteRing<R> to Ring*) and aring-translate.hpp (horizontal cross-ring mypromote / mylift) move values between the two worlds. The file also carries the HAVE_FLINT_RAND_INIT compatibility shim that aring users touch when bumping the FLINT submodule version (flint_rand_init vs. flint_randinit).
Definition in file aring.hpp.