Realm

oa::matrix::compact_rows

Compact the selected rows of input on device without host readback. input is [T, D] FP32 and mask is [T] FP32; one workgroup runs the donor chunked prefix scan so row_map, count, and dispatch_args stay device-resident, matching OA C++ FnMatrix::compactRows. values keeps fixed [T, D] capacity with unselected slots zeroed. Errors Returns an error when input is not rank-two FP32, mask is not FP32 with T elements, an extent exceeds the shader ABI, allocation fails, or runtime recording fails.

FnRust public API

Function Documentation

pub fn compact_rows( input: &Matrix, mask: &Matrix ) -> Result<CompactRowsResult>
Compact the selected rows of input on device without host readback. input is [T, D] FP32 and mask is [T] FP32; one workgroup runs the donor chunked prefix scan so row_map, count, and dispatch_args stay device-resident, matching OA C++ FnMatrix::compactRows. values keeps fixed [T, D] capacity with unselected slots zeroed. Errors Returns an error when input is not rank-two FP32, mask is not FP32 with T elements, an extent exceeds the shader ABI, allocation fails, or runtime recording fails.