Macaulay2 Engine
Loading...
Searching...
No Matches
SLP.hpp File Reference

Public umbrella header for the templated straight-line-program evaluator (SLProgram / SLEvaluatorConcrete). More...

#include "mutablemat-defs.hpp"
#include "SLP-defs.hpp"
#include "SLP-imp.hpp"
#include "mutablemat-imp.hpp"
#include "buffer.hpp"
#include "matrix.hpp"
#include "aring-glue.hpp"

Go to the source code of this file.

Detailed Description

Public umbrella header for the templated straight-line-program evaluator (SLProgram / SLEvaluatorConcrete).

Note
AI-generated documentation. Verify against the source before relying on it.

A straight-line program is a DAG whose nodes are inputs, constants, and gate operations: the SLProgram::GATE_TYPE enum in SLP-defs.hpp lists exactly Copy, MCopy, Sum, Product, MSum, MProduct, Det, and Divide (the M prefix marks the matrix-valued variant). Callers compile a polynomial system or a Jacobian into one of these once and then evaluate it many times — a single forward sweep that shares common subexpressions across outputs and stays cache friendly relative to walking a polynomial AST. Derivatives for Newton-step paths are kept as separately-compiled SLPs for the relevant Jacobian (see PathTracker's slpH / slpHxt / slpHxtH / slpHxH fields in NAG.hpp — the trailing |H variants pair the derivative with the homotopy for in-step substitution), not produced by reverse-mode autodiff inside the SLP.

The implementation is split across three files so the same code can be instantiated over the engine's numerical rings M2::ARingRR, M2::ARingCC, M2::ARingRRR, M2::ARingCCC: SLP-defs.hpp declares SLProgram, HomotopyAlgorithm, and the value-type templates, SLP-imp.hpp provides SLEvaluatorConcrete<RT> and the homotopy implementations, and SLP.cpp carries the non-template glue. A separate older StraightLineProgram / SLP<Field> design in NAG.hpp is what NAG.cpp's PathTracker actually uses.

See also
NAG.hpp
SLP-defs.hpp
SLP-imp.hpp

Definition in file SLP.hpp.