Template Struct CachedValue¶
Defined in File value_id.hpp
Struct Documentation¶
-
template<meta::eval_node Node>
struct CachedValue¶ The runtime-cache key: a non-owning handle to a forest node.
On the forest-descent path a cached value’s identity is its node’s canonical hash (
hash::value) – exactly whatCachedValueHasher/CachedValueEqualkeyCacheManager'smap by. The batched (table-driven) executor never consults this map for values at all: it keys by cell id instead (seecell_table.hpp), so no per-scope slice coloring is threaded through here. Node-facing operations forward to the node viaoperator->soCacheManager'sinternals retarget mechanically.The key does NOT own its node. Copying an eval node deep-copies its whole subtree (binary_node.hpp), so an owning key made registering every internal node of an equation’s left-leaning Sum-tree (one spine node per summand, each subtree larger than the last) cost O(terms^2) node copies. A key is a pointer instead, so registration is O(1) per node at any
min_repeats. Whoever builds theCacheManagerguarantees that every keyed node outlives it and stays at its address (seecache_manager()). Node identity (hash, structure, connectivity graph) is fixed at construction; the batch annotations a node may receive later do not enter it.