Builds a pass that packs a strided vector (src[i*inc], i < n) into a
new contiguous buffer. Level 2 kernels re-read a vector once per matrix
row, so a non-unit stride repeats the scattered gather n times; packing
first costs one O(n) pass and lets the O(n²) kernel run at unit stride.
Returns the pass (for runComputePasses in compute) plus the buffers the
caller must destroy.
Builds a pass that packs a strided vector (
src[i*inc],i < n) into a new contiguous buffer. Level 2 kernels re-read a vector once per matrix row, so a non-unit stride repeats the scattered gather n times; packing first costs one O(n) pass and lets the O(n²) kernel run at unit stride.Returns the pass (for
runComputePassesincompute) plus the buffers the caller must destroy.