pub struct Params {
pub num_threads: NumThreads,
pub chunk_size: ChunkSize,
pub iteration_order: IterationOrder,
}
Expand description
Parameters of a parallel computation.
Fields§
§num_threads: NumThreads
Number of threads to be used in the parallel computation.
See NumThreads
for details.
chunk_size: ChunkSize
Chunk size to be used in the parallel computation.
See ChunkSize
for details.
iteration_order: IterationOrder
Ordering of outputs of the parallel computation that is important when the outputs are collected into a collection.
See IterationOrder
for details.
Implementations§
Source§impl Params
impl Params
Sourcepub fn new(
num_threads: impl Into<NumThreads>,
chunk_size: impl Into<ChunkSize>,
iteration_order: IterationOrder,
) -> Params
pub fn new( num_threads: impl Into<NumThreads>, chunk_size: impl Into<ChunkSize>, iteration_order: IterationOrder, ) -> Params
Crates parallel computation parameters for the given configurations.
Sourcepub fn is_sequential(self) -> bool
pub fn is_sequential(self) -> bool
Returns true if number of threads is set to 1.
Note that in this case the computation will be executed sequentially using regular iterators.
Trait Implementations§
impl Copy for Params
impl Eq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more