pub struct AdaptiveSelector { /* private fields */ }Expand description
Adaptive algorithm selector
Implementations§
Source§impl AdaptiveSelector
impl AdaptiveSelector
Sourcepub fn new(device: Arc<Device>, device_type: DeviceType) -> Self
pub fn new(device: Arc<Device>, device_type: DeviceType) -> Self
Create a new adaptive selector
Sourcepub fn select_algorithm(
&self,
operation: &str,
workload: &WorkloadInfo,
) -> Algorithm
pub fn select_algorithm( &self, operation: &str, workload: &WorkloadInfo, ) -> Algorithm
Select best algorithm for a given operation
Sourcepub fn record_performance(
&self,
operation: &str,
workload: &WorkloadInfo,
algorithm: &Algorithm,
duration: Duration,
)
pub fn record_performance( &self, operation: &str, workload: &WorkloadInfo, algorithm: &Algorithm, duration: Duration, )
Record performance for an algorithm
Sourcepub fn get_statistics(&self, operation: &str) -> Option<AlgorithmStats>
pub fn get_statistics(&self, operation: &str) -> Option<AlgorithmStats>
Get performance statistics
Trait Implementations§
Source§impl Clone for AdaptiveSelector
impl Clone for AdaptiveSelector
Source§fn clone(&self) -> AdaptiveSelector
fn clone(&self) -> AdaptiveSelector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdaptiveSelector
impl !RefUnwindSafe for AdaptiveSelector
impl Send for AdaptiveSelector
impl Sync for AdaptiveSelector
impl Unpin for AdaptiveSelector
impl UnsafeUnpin for AdaptiveSelector
impl !UnwindSafe for AdaptiveSelector
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