Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
lu_solver.hpp File Reference

A stateful partial-pivot LU solver that owns precision-adjustable temporary banks. More...

Include dependency graph for lu_solver.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bertini::linalg::PartialPivLU< NumT >
 Stateful partial-pivot LU factor/solve with preallocated, precision-adjustable banks. More...

Namespaces

namespace  bertini
namespace  bertini::linalg

Detailed Description

A stateful partial-pivot LU solver that owns precision-adjustable temporary banks.

Eigen's generic dense LU allocates one multiprecision temporary per elementary scalar operation – O(N^3) heap allocations (mpc_init2 / mpc_clear, plus the per-alloc MPFR get_memory_functions fetch, the thread-local working-precision read, and the mimalloc ownership check) per factorization. For runtime-precision mpc that allocation churn is a large fraction of the cost and it scales with N^3.

This class factors in place, reusing a single scratch scalar across the whole elimination, so a factorization performs O(1) allocations instead of O(N^3). It owns its workspace across calls and exposes a ChangePrecision() so the owner (a Newton corrector / predictor) can move it up and down in precision the way the AMP tracker and endgames re-precision their scratch – see NewtonCorrector::ChangePrecision.