Template Function sequant::eval::detail::slot_modes_of

Function Documentation

template<typename Node>
container::svector<Index> sequant::eval::detail::slot_modes_of(Node const &n)

A node’s own result-slot modes: its canonical indices, each taken as itself.

Batch loops are always over plain occ/aux modes (the DP’s batchable modes; a PAO/PNO composite a<i,j> is the CSV inner dimension, never a loop axis), so a batch mode lives on this node iff it appears here as a plain slot. A composite slot a<i,j> therefore contributes only mode a, not its proto pair i,j: in array land a<i,j> is just mode a over an <i,j>-tied range, and slicing an i / j loop does nothing to mode a. Callers (the residency meet in stamp_residency_impl, and value_key_impl's per-value keying below) intersect the in-scope batch modes with this set to keep only those on n's result; a node carrying none of a loop’s mode is left unsliced by it (loop-invariant).