pub enum Parallelism {
Serial,
Auto,
Threads(usize),
}Expand description
CPU scheduling preference.
Variants§
Serial
One worker.
Auto
Backend chooses from available parallelism and workload size.
Threads(usize)
Upper bound on worker count. Zero is rejected by the builder.
Implementations§
Source§impl Parallelism
impl Parallelism
Sourcepub fn worker_bound(self) -> usize
pub fn worker_bound(self) -> usize
Most worker threads this preference lets an operation run on.
What ScratchRequirement::fits_budget charges a per-worker scratch
term against. Serial is one worker and Threads(n) is n. Auto
is the machine’s available parallelism, the width of a default
thread pool, or 1 when it cannot be determined (the same fallback
such a pool uses). A provider that runs on a wider pool than this
must check its budget against the width it actually runs on.
Trait Implementations§
Source§impl Clone for Parallelism
impl Clone for Parallelism
Source§fn clone(&self) -> Parallelism
fn clone(&self) -> Parallelism
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Parallelism
Source§impl Debug for Parallelism
impl Debug for Parallelism
impl Eq for Parallelism
Source§impl Hash for Parallelism
impl Hash for Parallelism
Source§impl PartialEq for Parallelism
impl PartialEq for Parallelism
impl StructuralPartialEq for Parallelism
Auto Trait Implementations§
impl Freeze for Parallelism
impl RefUnwindSafe for Parallelism
impl Send for Parallelism
impl Sync for Parallelism
impl Unpin for Parallelism
impl UnsafeUnpin for Parallelism
impl UnwindSafe for Parallelism
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more