|
Macaulay2 Engine
|
Translation bridge that lets GMP-backed DMat<ARingQQ> borrow FLINT matrix arithmetic. More...
Go to the source code of this file.
Classes | |
| class | FlintZZMat |
| RAII wrapper around FLINT's fmpz_mat_t for translating dense ZZ-coefficient matrices between the engine and FLINT. More... | |
| class | FlintQQMat |
| RAII wrapper around FLINT's fmpq_mat_t for translating dense QQ-coefficient matrices between the engine and FLINT. More... | |
Translation bridge that lets GMP-backed DMat<ARingQQ> borrow FLINT matrix arithmetic.
Declares FlintZZMat (and the corresponding FlintQQMat used by neighbouring LU code), small RAII wrappers that hold a FLINT fmpz_mat_t / fmpq_mat_t and copy entries in from a DMat<M2::ARingQQ> (or DMatZZGMP) on construction so the work itself can run through FLINT's fast fmpz_mat_* / fmpq_mat_* routines. After the FLINT call the wrapper provides a back-copy path to land the result in the engine's native matrix type, and the destructor releases the FLINT storage.
The layer exists because the default ARingQQ alias still resolves to ARingQQGMP, so DMat<ARingQQ> stores mpq_t values — but FLINT's matrix routines need FLINT storage to deliver their speedups. Once the default ARingQQ flips to ARingQQFlint (see aring-qq.hpp), callers can talk to dmat-qq-flint.hpp directly and this translation file can be removed.
Definition in file dmat-qq-interface-flint.hpp.