wgblas
    Preparing search index...
    • 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.

      Parameters

      • device: GPUDevice
      • src: GPUBuffer

        the strided vector's buffer

      • n: number

        logical length

      • inc: number

        stride (> 1)

      • label: string

      Returns Promise<{ buffer: GPUBuffer; params: GPUBuffer; pass: object }>