pub fn filter_compact<T, F>(data: &[T], predicate: F) -> Vec<T>Expand description
Stream compaction: collect elements satisfying predicate into a new vec.
Mimics GPU stream compaction (prefix-sum + scatter). The output preserves the relative order of passing elements.