Template Function sequant::cache_manager(meta::eval_node_range auto const&, size_t)¶
Defined in File cache_manager.hpp
Function Documentation¶
-
template<bool force_hash_collisions = false>
auto sequant::cache_manager(meta::eval_node_range auto const &nodes, size_t min_repeats = 1) noexcept¶ Make a cache manager from an iterable of evaluable nodes.
See also
CacheManager
- Parameters:
nodes – An iterable of eval nodes.
min_repeats – Minimum number of repeats for a node to be cached. By default (1) everything is cached, so use-count tracking is exact. The table-driven ordered executor derives every life from the cell table’s exact per-cell read count, and a use-count-tracking cache that silently declines single-use nodes makes that count wrong; with 1 the cache and the table agree by construction. Pass 2 to cache only nodes reached more than once, which caches less and leaves the use counts approximate.
- Returns:
A cache manager.