Skip to main content

compaction_offsets

Function compaction_offsets 

Source
pub fn compaction_offsets(mask: &[bool]) -> Vec<usize>
Expand description

Build a compaction offset table from a boolean mask.

Returns a vec of length mask.len() where offsets[i] is the compacted index for element i, or usize::MAX when mask[i] is false.