Eight-register output tiling #
This module implements the wider concrete scalar-register lowering selected
for large contractions. Its update step refines the arbitrary-width semantics
from Tiling.Semantics; the width is an implementation choice rather than a
semantic restriction.
Every lane observes contracted coordinates in the same row-major order as the scalar lowering, so tiling requires no reassociation, commutativity, or distributivity argument.
Select one of eight values by a statically bounded lane index.
Instances For
Selecting a concrete eight-lane contraction after summing each lane agrees with summing the selected lane.
Update the proof-facing state of an eight-lane tile.
For large concrete contractions, compileCoordinateFold recognizes this
exact update and first emits nativeFinSum8, which carries the eight totals
as separate loop arguments. The surrounding output pass fuses an immediately
consumed result into nativeFinSum8Push. The scalar-state theorems prove both
forms compute this vector update exactly.
Instances For
Append one completed eight-lane tile to a row-major output buffer.
Instances For
Pointwise equal lane values determine equal eight-lane vectors.
Appending an eight-lane function vector emits its values in lane order.
Projecting an eight-lane update gives the corresponding scalar update.
The eight-register update implements the width-polymorphic tile update.
Run a native finite sum while carrying eight lane totals as separate scalar arguments.
The compiler selects this loop when eight neighboring outputs are available and shared coordinate work amortizes the additional live state. Both concrete tile widths advance one contraction coordinate per recursive step; the eight-lane loop keeps twice as many independent accumulators live.
Instances For
Sum eight lanes over a native finite interval without vector operations inside the loop.
Instances For
Run the eight scalar accumulators and append their final values directly to an existing output buffer.
The terminal pushes avoid constructing a temporary result vector between the contraction loop and the surrounding output loop.
Instances For
Sum eight lanes and append them without materializing the intermediate vector.
Instances For
The eight-scalar native loop is exactly the ordinary native fold using
updateTile8. In particular, every lane retains its original reduction order.
Directly appending the scalar loop totals is exactly pushTile8 applied to
the vector-valued loop result.
Run eight scalar accumulators, apply one terminal function to each total, and append the results directly to an existing output buffer.
The terminal functions run only after the contraction has completed. This keeps factored semiring operands out of the hot loop without introducing an intermediate result vector.
Instances For
Sum eight lanes and apply their terminal functions directly at the output buffer boundary.
Instances For
Applying terminal functions at the end of the eight-scalar loop is equivalent to mapping those functions over the vector-valued loop result before append.