pub struct KernelSelector {
pub gemm_f64_kernel: GemmKernelKind,
pub gemm_f32_kernel: GemmKernelKind,
}Expand description
Selects the optimal GEMM microkernel for f64 and f32 based on the CPU
capabilities detected at runtime (or compile-time on no_std).
Call KernelSelector::select once at startup to obtain the globally
cached selector; subsequent calls return the same reference (std) or a
freshly computed identical value (no_std).
Fields§
§gemm_f64_kernel: GemmKernelKindBest microkernel kind for double-precision (f64) GEMM.
gemm_f32_kernel: GemmKernelKindBest microkernel kind for single-precision (f32) GEMM.
Implementations§
Source§impl KernelSelector
impl KernelSelector
Sourcepub fn select() -> &'static Self
pub fn select() -> &'static Self
Returns a reference to the globally cached KernelSelector.
The first call performs detection; all subsequent calls return the same
&'static reference.
Trait Implementations§
Source§impl Clone for KernelSelector
impl Clone for KernelSelector
Source§fn clone(&self) -> KernelSelector
fn clone(&self) -> KernelSelector
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 moreSource§impl Debug for KernelSelector
impl Debug for KernelSelector
Source§impl PartialEq for KernelSelector
impl PartialEq for KernelSelector
impl Copy for KernelSelector
impl Eq for KernelSelector
impl StructuralPartialEq for KernelSelector
Auto Trait Implementations§
impl Freeze for KernelSelector
impl RefUnwindSafe for KernelSelector
impl Send for KernelSelector
impl Sync for KernelSelector
impl Unpin for KernelSelector
impl UnsafeUnpin for KernelSelector
impl UnwindSafe for KernelSelector
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