Struct CacheConfig

Struct Documentation

struct CacheConfig

Configuration for a faithful (gated) dry-run cache: the same footprint gate and cross-occurrence batch-variant veto the real batched eval loop applies, so a batch-variant giant (a mu~/K-carrying DF intermediate) is not cached whole but recomputed sliced under each consumer’s batch trigger.

The element types mirror the gated sequant::cache_manager overload (cache_manager.hpp): is_volatile is invoked on every TreeNode (deduced as EvalNodeDryRun for the dry-run backend).

This struct lives here (rather than only in the test) because meter() and MPQC’s dry-run entry point consume it.

Public Members

SEQUANT_DESIGNATED_INIT_ONLY
double max_footprint = 0.

Footprint gate (bytes): a node whose result footprint exceeds this is not cached. 0 (default) disables the gate.

std::size_t min_repeats = 1

Minimum non-persistent repeats to cache an internal node (CSE rule).

std::function<bool(EvalNodeDryRun const&)> is_volatile

bool(EvalNodeDryRun const&): true if the node is intrinsically volatile (typically the amplitude leaves). Empty => nothing is volatile.