pub fn build_grid(
x: &[f32],
y: &[f32],
z: &[f32],
origin: [f32; 3],
dims: [u32; 3],
cell_size: f32,
) -> (Vec<u32>, Vec<u32>)Expand description
Stable counting-sort into grid cells, returning sorted indices and CSR offsets.
Reverse scattering reuses cumulative cell ends as the final start offsets, without an additional cell-sized cursor allocation.