pub struct CacheAwareWorkStealer<T: Clone + Send + 'static> { /* private fields */ }
Expand description
Cache-aware work-stealing scheduler with memory locality optimization
Implementations§
Source§impl<T: Clone + Send + 'static> CacheAwareWorkStealer<T>
impl<T: Clone + Send + 'static> CacheAwareWorkStealer<T>
Sourcepub fn new(
_num_workers: usize,
strategy: CacheAwareStrategy,
) -> LinalgResult<Self>
pub fn new( _num_workers: usize, strategy: CacheAwareStrategy, ) -> LinalgResult<Self>
Create a new cache-aware work stealer
Sourcepub fn execute_cache_aware<F, R>(
&self,
work_items: Vec<WorkItem<T>>,
worker_fn: F,
strategy: CacheAwareStrategy,
) -> LinalgResult<Vec<R>>
pub fn execute_cache_aware<F, R>( &self, work_items: Vec<WorkItem<T>>, worker_fn: F, strategy: CacheAwareStrategy, ) -> LinalgResult<Vec<R>>
Execute work with cache-aware distribution
Sourcepub fn update_cache_miss_rate(
&self,
worker_id: usize,
missrate: f64,
) -> LinalgResult<()>
pub fn update_cache_miss_rate( &self, worker_id: usize, missrate: f64, ) -> LinalgResult<()>
Update cache miss rate for a worker
Sourcepub fn get_numa_optimal_worker(&self, memorynode: usize) -> usize
pub fn get_numa_optimal_worker(&self, memorynode: usize) -> usize
Get NUMA-aware worker assignment for a task
Auto Trait Implementations§
impl<T> Freeze for CacheAwareWorkStealer<T>
impl<T> RefUnwindSafe for CacheAwareWorkStealer<T>
impl<T> Send for CacheAwareWorkStealer<T>
impl<T> Sync for CacheAwareWorkStealer<T>
impl<T> Unpin for CacheAwareWorkStealer<T>
impl<T> UnwindSafe for CacheAwareWorkStealer<T>
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