pub struct NaiveBackend;Expand description
Fallback batched GEMM backend using explicit loops (no external library).
This backend is used as ActiveBackend when no GEMM feature is enabled.
The GEMM dispatch in einsum2_into calls bgemm_naive directly rather
than going through the Backend trait, so bgemm_contiguous_into is
unreachable.
Trait Implementations§
Source§impl<T: ScalarBase> Backend<T> for NaiveBackend
impl<T: ScalarBase> Backend<T> for NaiveBackend
Source§const MATERIALIZES_CONJ: bool = false
const MATERIALIZES_CONJ: bool = false
Whether the backend needs conjugation materialized into the data
before GEMM (e.g., CBLAS has no conjugation flag for
?gemm).Source§const REQUIRES_UNIT_STRIDE: bool = false
const REQUIRES_UNIT_STRIDE: bool = false
Whether the backend requires at least one unit stride per matrix
dimension (row or column stride must be 1). CBLAS
?gemm requires
this; faer does not.Source§fn bgemm_contiguous_into(
_c: &mut ContiguousOperandMut<T>,
_a: &ContiguousOperand<T>,
_b: &ContiguousOperand<T>,
_batch_dims: &[usize],
_m: usize,
_n: usize,
_k: usize,
_alpha: T,
_beta: T,
) -> Result<()>
fn bgemm_contiguous_into( _c: &mut ContiguousOperandMut<T>, _a: &ContiguousOperand<T>, _b: &ContiguousOperand<T>, _batch_dims: &[usize], _m: usize, _n: usize, _k: usize, _alpha: T, _beta: T, ) -> Result<()>
Execute batched GEMM:
C = alpha * A * B + beta * C for each batch. Read moreAuto Trait Implementations§
impl Freeze for NaiveBackend
impl RefUnwindSafe for NaiveBackend
impl Send for NaiveBackend
impl Sync for NaiveBackend
impl Unpin for NaiveBackend
impl UnwindSafe for NaiveBackend
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
§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