pub struct AutoOptimizer { /* private fields */ }
Expand description
Automatic operation selection based on problem size and available features
Implementations§
Source§impl AutoOptimizer
impl AutoOptimizer
pub fn new() -> Self
Sourcepub fn should_use_gpu(&self, size: usize) -> bool
pub fn should_use_gpu(&self, size: usize) -> bool
Determine if GPU should be used for a given problem size
Sourcepub fn should_use_metal(&self, size: usize) -> bool
pub fn should_use_metal(&self, size: usize) -> bool
Determine if Metal should be used on macOS
Sourcepub fn should_use_simd(&self, size: usize) -> bool
pub fn should_use_simd(&self, size: usize) -> bool
Determine if SIMD should be used
Sourcepub fn select_gemm_impl(&self, m: usize, n: usize, k: usize) -> &'static str
pub fn select_gemm_impl(&self, m: usize, n: usize, k: usize) -> &'static str
Select the best implementation for matrix multiplication
Sourcepub fn select_vector_impl(&self, size: usize) -> &'static str
pub fn select_vector_impl(&self, size: usize) -> &'static str
Select the best implementation for vector operations
Sourcepub fn select_reduction_impl(&self, size: usize) -> &'static str
pub fn select_reduction_impl(&self, size: usize) -> &'static str
Select the best implementation for reduction operations
Sourcepub fn select_fft_impl(&self, size: usize) -> &'static str
pub fn select_fft_impl(&self, size: usize) -> &'static str
Select the best implementation for FFT operations
Sourcepub fn has_unified_memory(&self) -> bool
pub fn has_unified_memory(&self) -> bool
Check if running on Apple Silicon with unified memory
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AutoOptimizer
impl RefUnwindSafe for AutoOptimizer
impl Send for AutoOptimizer
impl Sync for AutoOptimizer
impl Unpin for AutoOptimizer
impl UnwindSafe for AutoOptimizer
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