pub struct FixedRangeFactory {
num_elements: usize,
num_threads: usize,
}Expand description
A factory that hands out a fixed range to each thread, without any stealing.
Fields§
§num_elements: usizeTotal number of elements to iterate over.
num_threads: usizeNumber of threads that iterate.
Trait Implementations§
Source§impl RangeFactory for FixedRangeFactory
impl RangeFactory for FixedRangeFactory
type Rn = FixedRange
type Orchestrator = FixedRangeOrchestrator
Source§fn new(num_elements: usize, num_threads: usize) -> Self
fn new(num_elements: usize, num_threads: usize) -> Self
Creates a new factory for a range with the given number of elements
split across the given number of threads.
Source§fn orchestrator(self) -> FixedRangeOrchestrator
fn orchestrator(self) -> FixedRangeOrchestrator
Returns the orchestrator object for all the ranges created by this
factory.
Source§fn range(&self, thread_id: usize) -> FixedRange
fn range(&self, thread_id: usize) -> FixedRange
Returns the range for the given thread.
Auto Trait Implementations§
impl Freeze for FixedRangeFactory
impl RefUnwindSafe for FixedRangeFactory
impl Send for FixedRangeFactory
impl Sync for FixedRangeFactory
impl Unpin for FixedRangeFactory
impl UnwindSafe for FixedRangeFactory
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
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