Template Function sequant::eval::dryrun::build_dryrun_cache¶
Defined in File meter.hpp
Function Documentation¶
-
template<typename NodeRange>
auto sequant::eval::dryrun::build_dryrun_cache(NodeRange const &nodes, CacheConfig const &cfg, SizeRegime const ®ime)¶ Builds a gated dry-run cache from an eval-node range, a
cfg, and aregimethat supplies the moment-aware node-size model used for the footprint gate.The footprint functor sizes a node’s result (its
canon_indices()) with the same moment-aware counter the DryRunResultuses (memsize_counteroverregime.idx_to_extent()/inner_pow_fn()), scaled to bytes, so the gate compares like-for-like againstcfg.max_footprint.Unlike the simple
cache_manager(nodes)factory the ad-hoc dry-run test sites use, this routes through the gated overload so free-batchable-axis giants are vetoed (matching the real run). The returned cache is used across the whole forest without a per-summand reset (matching a real solve’s whole-iteration cache scope; the replay relies on the lifetime mask to release each value after its last cross-term use, so cross-summand-shared values are reused, not rebuilt).- Parameters:
nodes – the evaluation forest (a range of
EvalNodeDryRun).cfg – footprint/repeat/volatility/batchability configuration.
regime – the size regime supplying extents and CSV moment tables.
- Returns:
a
CacheManageroverEvalNodeDryRun.