pub enum CpuBackendKind {
Faer,
Blas,
}Expand description
CPU provider selected by a CpuBackend instance.
CPU provider features are additive at compile time; this runtime selector chooses which compiled provider an individual backend uses for provider-owned kernels such as GEMM.
§Examples
use tenferro_cpu::CpuBackendKind;
let kind = CpuBackendKind::default_compiled();
assert!(matches!(kind, CpuBackendKind::Faer | CpuBackendKind::Blas));Variants§
Implementations§
Source§impl CpuBackendKind
impl CpuBackendKind
Sourcepub fn default_compiled() -> Self
pub fn default_compiled() -> Self
Return the default compiled CPU provider.
BLAS is preferred when both BLAS and faer are compiled in because an application that links a BLAS/LAPACK provider normally expects provider-backed kernels to use it by default.
§Examples
use tenferro_cpu::CpuBackendKind;
let _kind = CpuBackendKind::default_compiled();Trait Implementations§
Source§impl Clone for CpuBackendKind
impl Clone for CpuBackendKind
Source§fn clone(&self) -> CpuBackendKind
fn clone(&self) -> CpuBackendKind
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 CpuBackendKind
impl Debug for CpuBackendKind
Source§impl Hash for CpuBackendKind
impl Hash for CpuBackendKind
Source§impl PartialEq for CpuBackendKind
impl PartialEq for CpuBackendKind
impl Copy for CpuBackendKind
impl Eq for CpuBackendKind
impl StructuralPartialEq for CpuBackendKind
Auto Trait Implementations§
impl Freeze for CpuBackendKind
impl RefUnwindSafe for CpuBackendKind
impl Send for CpuBackendKind
impl Sync for CpuBackendKind
impl Unpin for CpuBackendKind
impl UnsafeUnpin for CpuBackendKind
impl UnwindSafe for CpuBackendKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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