pub trait ParallelSliceExt<T> {
// Required methods
fn chunked_map<R, F>(&self, config: &ChunkConfig, map_fn: F) -> Vec<R>
where T: Sync,
R: Send,
F: Fn(&T) -> R + Sync;
fn chunked_reduce<F>(
&self,
config: &ChunkConfig,
identity: T,
reduce_fn: F,
) -> T
where T: Clone + Send + Sync,
F: Fn(T, T) -> T + Sync;
}Expand description
Extension trait for enhanced parallel operations on slices
Required Methods§
Sourcefn chunked_map<R, F>(&self, config: &ChunkConfig, map_fn: F) -> Vec<R>
fn chunked_map<R, F>(&self, config: &ChunkConfig, map_fn: F) -> Vec<R>
Map with automatic chunk optimization
Sourcefn chunked_reduce<F>(
&self,
config: &ChunkConfig,
identity: T,
reduce_fn: F,
) -> T
fn chunked_reduce<F>( &self, config: &ChunkConfig, identity: T, reduce_fn: F, ) -> T
Reduce with automatic chunk optimization
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.