Struct CellLegality¶
Defined in File legality.hpp
Struct Documentation¶
-
struct CellLegality¶
The legality record of one value (one
ValueCell::hash): its build-site, per-axis role, and home-placement legality.Public Members
-
std::size_t hash = 0¶
== value_key_of(ValueCell): the value id (node id + home-sliced positions), the join key with the rich schedule
-
container::svector<Index> build_site¶
The batch-loop axes this value depends on at its own node — carried in its own result or contracted at its own node (not recursively over its operand subtrees; each operand is itself a value with its own, separately-analyzed
CellLegality). Filled bybuild_site_of.
-
container::svector<AxisClass> per_axis¶
One entry per
build_siteaxis, classifying its role. Filled byanalyze_legality.Note
LoopRole::LoopInvariantis never stored here — everybuild_siteaxis is by construction carried or contracted, soclassify_axisreturns only LoopLocal/Reduction/LoopCarried at these axes. A LoopInvariant axis is the implicit case (batchable + enclosing but absent frombuild_site); recover it from that absence, not from aper_axisentry (seehome_floor).
-
container::svector<Index> home_floor¶
The shallowest legal home mode-set for this value: the
per_axisaxes whose role isLoopLocal(the axes the value stays sliced on — the value is homed inside these). Every otherbuild_siteaxis —Reduction,LoopCarried— is lifted out (the value is homed above it), as is any axis absent frombuild_sitealtogether (the implicitLoopInvariantcase: the value never depended on it, so it was trivially hoisted over it). Filled byanalyze_legality.
-
container::svector<Index> forced_split_axes¶
Loops that must re-enter (the value cannot be homed above them without a re-materializing split). Entries are per-
Index-instance, not per-space-type — an outer product likeA{;i_3}*A{;i_4} lists both i_3 and i_4 (both LoopCarried on space i), yet they name a single occ loop to split. Consumers that want the distinct loops (axes) to split, not the raw per-instance list, should useforced_split_typesbelow.
-
std::size_t hash = 0¶