Function sequant::eval::detail::residency_scope¶
Defined in File cell_table.hpp
Function Documentation¶
-
inline CellScope sequant::eval::detail::residency_scope(TableCell const &s)¶
The scope over which a produced cell
sremains resident, once produced — decided bys.production.kind, exactly three cases: (1)Assemble:the prefix ofs.scope.pathending at the deepest instance inbound_instances(s)(it dies when that loop’s batch ends); the root scope (empty path) whensis bound to none of its enclosing loops — the runtime’s close-store walk homes a whole block output that far out, all the way to the chain root; (2)Build(plain and implicit per-batch alike): alwayss.scopeitself, bound or whole — a step’s value is stored in its own block’s cache and dies with that block, so even a whole Build cell spans only that block’s batches, never further out; (3)Leaf:the root scope.persistentandproduce_if_absentare separate properties (survival across evaluations / first-visit production, not where within one evaluation a cell lives) and are not consulted here.Note
This is the residency ceiling, deliberately: it is where a table-driven executor may home the cell, since such an executor homes an Assemble at that scope and slices every read of it explicitly. The forest runtime’s close-store walk stops earlier in two cases — at a loop that some consumer reads the value inside, and at the end of the cache chain — so a value that runtime holds deeper than this says is not a table defect; the reverse (the runtime holding it shallower than the table claims) would be.