Struct TableCell

Struct Documentation

struct TableCell

Represents one form of a value at one scope. Named TableCell to avoid collision with the existing sequant::eval::Cell in peak_profile.hpp.

Public Members

std::size_t value_id = 0
container::svector<std::pair<std::size_t, LoopKey>> sliced

carried position -> loop instance slicing it; empty = whole.

container::svector<LoopKey> partial_over

loop instances this cell is a partial sum over (a reduced axis has no carried position, so it cannot appear in sliced); empty = complete over every reduced axis.

CellScope scope
Production production
bool produce_if_absent = false
bool persistent = false

Cross-evaluation invariance and a reader on a later evaluation – the frontier of the invariant region, not all of it: (a) the cell carries no volatile leaf and is bound to no loop instance (detail::bound_instances empty), so its content is identical across every batch and across repeated evaluations of the same schedule and may survive a cache reset between them; And (b) some consumer of it holds a volatile value, or it has no consumer at all (a forest root – validator rule 4 admits a zero-consumer cell only at the root scope). (b) is what makes this the frontier: a cell all of whose consumers are non-volatile is never read again, because those consumers are themselves skipped by cache-halt on every later evaluation – holding it across evaluations would cost its bytes and buy nothing. See detail::apply_persistence_frontier (cell_table_builder.hpp), which decides (b) once the table’s reads exist.

This is distinct from the forest evaluator’s per-scratch “survives the

reset of its home scope” flag, which tests only the innermost home loop (a cell bound to an outer loop passes that test and fails this one).