pub struct AdaptiveOptimizer { /* private fields */ }
Expand description
Adaptive optimization based on runtime characteristics
Implementations§
Source§impl AdaptiveOptimizer
impl AdaptiveOptimizer
Sourcepub fn should_use_parallel(&self, size: usize) -> bool
pub fn should_use_parallel(&self, size: usize) -> bool
Check if parallel execution should be used for given size
Sourcepub fn should_use_simd(&self, size: usize) -> bool
pub fn should_use_simd(&self, size: usize) -> bool
Check if SIMD should be used for given size
Sourcepub fn update_from_measurement(
&mut self,
operation: &str,
size: usize,
durationns: u64,
)
pub fn update_from_measurement( &mut self, operation: &str, size: usize, durationns: u64, )
Update thresholds based on performance measurements
Sourcepub fn optimal_chunk_size<T>(&self) -> usize
pub fn optimal_chunk_size<T>(&self) -> usize
Get optimal chunk size for cache-friendly operations
Sourcepub fn should_use_gpu(&self, size: usize) -> bool
pub fn should_use_gpu(&self, size: usize) -> bool
Check if GPU acceleration should be used for given size
Sourcepub fn select_for_operation(
&self,
operationname: &str,
size: usize,
) -> OptimizationStrategy
pub fn select_for_operation( &self, operationname: &str, size: usize, ) -> OptimizationStrategy
Select the optimal strategy for a given operation
Sourcepub fn record_performance(
&mut self,
operation: &str,
size: usize,
strategy: OptimizationStrategy,
duration_ns: u64,
)
pub fn record_performance( &mut self, operation: &str, size: usize, strategy: OptimizationStrategy, duration_ns: u64, )
Record performance measurement and update adaptive parameters
Sourcepub fn get_performance_metrics(&self) -> Option<PerformanceMetrics>
pub fn get_performance_metrics(&self) -> Option<PerformanceMetrics>
Get performance metrics for analysis
Sourcepub fn analyze_operation(
&self,
operation_name: &str,
inputsize: usize,
) -> OptimizationAdvice
pub fn analyze_operation( &self, operation_name: &str, inputsize: usize, ) -> OptimizationAdvice
Analyze operation characteristics to suggest optimizations
Sourcepub fn select_optimal_strategy(
&self,
_operation_name: &str,
input_size: usize,
) -> OptimizationStrategy
pub fn select_optimal_strategy( &self, _operation_name: &str, input_size: usize, ) -> OptimizationStrategy
Select optimal strategy based on operation name and input size
Sourcepub fn has_gpu_support(&self) -> bool
pub fn has_gpu_support(&self) -> bool
Check if GPU support is available
Sourcepub fn has_simd_support(&self) -> bool
pub fn has_simd_support(&self) -> bool
Check if SIMD support is available
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AdaptiveOptimizer
impl RefUnwindSafe for AdaptiveOptimizer
impl Send for AdaptiveOptimizer
impl Sync for AdaptiveOptimizer
impl Unpin for AdaptiveOptimizer
impl UnwindSafe for AdaptiveOptimizer
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