pub struct WorkStealingScheduler<T>{ /* private fields */ }
Expand description
Work-stealing scheduler with dynamic load balancing
Implementations§
Source§impl<T: Send + 'static + Clone> WorkStealingScheduler<T>
impl<T: Send + 'static + Clone> WorkStealingScheduler<T>
Sourcepub fn with_strategy(
num_workers: usize,
strategy: StealingStrategy,
params: LoadBalancingParams,
) -> Self
pub fn with_strategy( num_workers: usize, strategy: StealingStrategy, params: LoadBalancingParams, ) -> Self
Create a new work-stealing scheduler with custom strategy
Sourcepub fn formatrix_operation(
num_workers: usize,
operation_type: MatrixOperationType,
matrixsize: (usize, usize),
) -> Self
pub fn formatrix_operation( num_workers: usize, operation_type: MatrixOperationType, matrixsize: (usize, usize), ) -> Self
Create optimized scheduler for specific matrix operations
Sourcepub fn submit_work(&self, items: Vec<WorkItem<T>>) -> LinalgResult<()>
pub fn submit_work(&self, items: Vec<WorkItem<T>>) -> LinalgResult<()>
Submit work items to the scheduler
Sourcepub fn execute<F, R>(&self, workfn: F) -> LinalgResult<Vec<R>>
pub fn execute<F, R>(&self, workfn: F) -> LinalgResult<Vec<R>>
Execute all work items using the work-stealing scheduler
Sourcepub fn get_stats(&self) -> SchedulerStats
pub fn get_stats(&self) -> SchedulerStats
Get current scheduler statistics
Sourcepub fn optimize_for_workload(
&self,
workload_characteristics: WorkloadCharacteristics,
) -> LinalgResult<()>
pub fn optimize_for_workload( &self, workload_characteristics: WorkloadCharacteristics, ) -> LinalgResult<()>
Adaptive performance monitoring and load balancing optimization
Sourcepub fn adaptive_chunk_sizing(
&self,
base_worksize: usize,
worker_efficiency: &[f64],
) -> Vec<usize>
pub fn adaptive_chunk_sizing( &self, base_worksize: usize, worker_efficiency: &[f64], ) -> Vec<usize>
Dynamic chunk size adjustment based on performance history
Sourcepub fn predict_execution_time(&self, workcomplexity: WorkComplexity) -> Duration
pub fn predict_execution_time(&self, workcomplexity: WorkComplexity) -> Duration
Advanced workload prediction based on execution history
Auto Trait Implementations§
impl<T> Freeze for WorkStealingScheduler<T>
impl<T> RefUnwindSafe for WorkStealingScheduler<T>
impl<T> Send for WorkStealingScheduler<T>
impl<T> Sync for WorkStealingScheduler<T>
impl<T> Unpin for WorkStealingScheduler<T>
impl<T> UnwindSafe for WorkStealingScheduler<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