Reduction index laws #
Reduction lowering enumerates retained output coordinates and removed-axis coordinates separately. These laws combine those counters into one row-major coordinate and identify the resulting compact arithmetic with the independent checked reduction reconstruction.
Compute a selected row-major index by decoding retained and reduced counters separately.
The retained axes occupy the high-order digits and the reduced axes occupy the low-order digits. Keeping the counters separate gives native reduction loops a direct affine index program without changing the checked coordinate semantics.
Instances For
Separately decoded row-major counters select the same source index as their single combined row-major counter.
Compute a reduction input index as one compact row-major selection.
The removed-axis counter occupies the low-order digits because reduction fibers are traversed inside each retained output coordinate.
Instances For
The compact row-major reduction index equals the independent reconstructed input coordinate.