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

The per-thread mutable working state of a straight-line program evaluation: the register file (one bank per number type), the working precision, and the freshness / frozen-prologue flags. More...

#include <straight_line_program.hpp>

Public Member Functions

template<typename NumT>
std::vector< NumT > & Get ()
 Get a mutable reference to the register bank for number type NumT.
template<typename NumT>
std::vector< NumT > const & Get () const
 Get a const reference to the register bank for number type NumT.

Public Attributes

std::tuple< std::vector< real_dbl >, std::vector< complex_dbl >, std::vector< real_mp >, std::vector< complex_mp > > registers_
 The register file (ADR-0034): one bank per (precision, NumType).
unsigned precision_ = 16
 The current working number of digits.
bool is_evaluated_ = false
 Whether the program has been evaluated against this memory.
bool frozen_valid_dbl_ = false
 Whether the frozen prologue's double results in memory are valid.
unsigned frozen_valid_mp_precision_ = 0
 Precision at which the frozen prologue's mp results are valid (0 = none).

Friends

class boost::serialization::access

Detailed Description

The per-thread mutable working state of a straight-line program evaluation: the register file (one bank per number type), the working precision, and the freshness / frozen-prologue flags.

Cheap to allocate; never shared across threads (ADR-0027).

Member Function Documentation

◆ Get() [1/2]

template<typename NumT>
std::vector< NumT > & bertini::SLPMemory::Get ( )
inline

Get a mutable reference to the register bank for number type NumT.

◆ Get() [2/2]

template<typename NumT>
std::vector< NumT > const & bertini::SLPMemory::Get ( ) const
inline

Get a const reference to the register bank for number type NumT.

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ frozen_valid_dbl_

bool bertini::SLPMemory::frozen_valid_dbl_ = false
mutable

Whether the frozen prologue's double results in memory are valid.

◆ frozen_valid_mp_precision_

unsigned bertini::SLPMemory::frozen_valid_mp_precision_ = 0
mutable

Precision at which the frozen prologue's mp results are valid (0 = none).

◆ is_evaluated_

bool bertini::SLPMemory::is_evaluated_ = false
mutable

Whether the program has been evaluated against this memory.

◆ precision_

unsigned bertini::SLPMemory::precision_ = 16
mutable

The current working number of digits.

◆ registers_

std::tuple< std::vector<real_dbl>, std::vector<complex_dbl>, std::vector<real_mp>, std::vector<complex_mp> > bertini::SLPMemory::registers_
mutable

The register file (ADR-0034): one bank per (precision, NumType).

A slot lives in exactly one bank, chosen by its NumType; the real banks are the real companions of the complex ones (real_dbl for complex_dbl, real_mp for complex_mp). Get<NumT>() selects a bank by type.