Certified native array slices #
Contiguous tensor blocks can be copied with Array.foldl rather than
recomputing a source index for every scalar. These helpers retain
Array.ofFn as their independent semantic reference.
Appending fixed-width rows in finite-index order reconstructs their flattened finite function.
Build a physical buffer by appending one fixed-width source slice per row.
For Float, appendSlice traverses the unboxed FloatArray directly.
Instances For
The physical slice builder observes as Array.ofFn when each copied source
row agrees with the corresponding semantic row.
The physical slice builder produces exactly the requested scalar count.
Build a shaped tensor by copying a fixed-width source slice for each row.
The shape equality and row certificates erase, leaving only the source array, four static index constants, and the native outer loop.
Instances For
The native tensor slice builder equals its ordinary finite-function tensor.