Template Function sequant::cache_manager(meta::eval_node_range auto const&, auto&&, size_t, FootprintOf, double)¶
Defined in File cache_manager.hpp
Function Documentation¶
-
template<bool force_hash_collisions = false, typename FootprintOf = zero_footprint>
auto sequant::cache_manager(meta::eval_node_range auto const &nodes, auto &&is_volatile, size_t min_repeats = 2, FootprintOf footprint_of = {}, double max_footprint = 0.)¶ See also
- Parameters:
nodes – the evaluation forest.
is_volatile –
bool(TreeNode const&): true if the node is intrinsically volatile. Only its value on leaves matters in practice (volatility propagates up), but it is consulted on every node.min_repeats – minimum NP repeats to cache (default 2).
footprint_of –
double(TreeNode const&): the materialized storage footprint of a node’s result (e.g. its element count or byte size). Consulted only whenmax_footprint> 0.max_footprint – footprint gate: any node whose
footprint_ofexceeds this is NOT cached (neither as an NP repeat nor as a P frontier node), so it is recomputed by each consumer instead of being materialized whole and held. This bounds the peak/sustained footprint of huge intermediates that carry a free large-space index (e.g. a half-transformed DF integral with a free projected-AO index), at the cost of recomputation. 0 (default) disables the gate.