Expand description
§FixedVec
Parallel Operations
This module provides parallel implementations for FixedVec
operations,
enabled by the parallel
feature flag. These methods are based on the Rayon
library.
§Examples
use compressed_intvec::fixed::{FixedVec, UFixedVec};
use rayon::prelude::*;
let data: Vec<u32> = (0..1000).collect();
let vec: UFixedVec<u32> = FixedVec::builder().build(&data).unwrap();
// Sum the elements in parallel.
let sum: u32 = vec.par_iter().sum();
assert_eq!(sum, (0..1000).sum());