Skip to main content

ThreadPoolArrayExt

Trait ThreadPoolArrayExt 

Source
pub trait ThreadPoolArrayExt<T, D> {
    // Required methods
    fn par_map_inplace<F>(&mut self, f: F)
       where F: Fn(&mut T) + Send + Sync;
    fn par_chunks_mut<F>(&mut self, chunksize: usize, f: F)
       where F: Fn(&mut [T]) + Send + Sync;
}
Expand description

Extension trait for arrays to use the shared thread pool

Required Methods§

Source

fn par_map_inplace<F>(&mut self, f: F)
where F: Fn(&mut T) + Send + Sync,

Apply a function to each element in parallel using the shared thread pool

Source

fn par_chunks_mut<F>(&mut self, chunksize: usize, f: F)
where F: Fn(&mut [T]) + Send + Sync,

Apply a function to chunks in parallel

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§