Skip to main content

histogram_u32

Function histogram_u32 

Source
pub fn histogram_u32(data: &[u32], num_buckets: usize) -> Vec<u32>
Expand description

Parallel histogram: count occurrences of data[i] % num_buckets per bucket.

Each rayon thread builds a private histogram; results are summed at the end. Returns a Vecu32of lengthnum_buckets`.

ยงPanics

Panics if num_buckets == 0.