pub struct Naive;Expand description
Simple backend, mostly for demonstratration purposes
Trait Implementations§
Source§impl<T: ComplexFloat<Real = T> + PartialOrd + Add<Output = T> + Mul<Output = T> + Zero + Copy> Argmax<T> for Naive
impl<T: ComplexFloat<Real = T> + PartialOrd + Add<Output = T> + Mul<Output = T> + Zero + Copy> Argmax<T> for Naive
fn argmax_write<Lx: Layout, S: Shape>( &self, x: &Slice<T, S, Lx>, output: &mut Vec<usize>, ) -> bool
Source§fn argmax<Lx: Layout, S: Shape>(
&self,
x: &Slice<T, S, Lx>,
) -> Option<Vec<usize>>
fn argmax<Lx: Layout, S: Shape>( &self, x: &Slice<T, S, Lx>, ) -> Option<Vec<usize>>
Index of max xᵢ (argmaxᵢ xᵢ)
fn argmax_abs_write<Lx: Layout, S: Shape>( &self, x: &Slice<T, S, Lx>, output: &mut Vec<usize>, ) -> bool
Source§impl<T> Contract<T> for Naive
impl<T> Contract<T> for Naive
Source§fn matmul<'a, D0, D1, D2, La, Lb>(
&self,
a: &'a Slice<T, (D0, D1), La>,
b: &'a Slice<T, (D1, D2), Lb>,
) -> impl MatmulBuilder<'a, T, D0, D1, D2, La, Lb>
fn matmul<'a, D0, D1, D2, La, Lb>( &self, a: &'a Slice<T, (D0, D1), La>, b: &'a Slice<T, (D1, D2), Lb>, ) -> impl MatmulBuilder<'a, T, D0, D1, D2, La, Lb>
Matrix multiplication. Read more
Source§fn contract_all<'a, Sa, Sb, La, Lb>(
&self,
a: &'a Slice<T, Sa, La>,
b: &'a Slice<T, Sb, Lb>,
) -> T
fn contract_all<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, ) -> T
Source§fn contract_n<'a, Sa, Sb, La, Lb>(
&self,
a: &'a Slice<T, Sa, La>,
b: &'a Slice<T, Sb, Lb>,
n: usize,
) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
fn contract_n<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, n: usize, ) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
Source§fn contract_pairs<'a, Sa, Sb, La, Lb>(
&self,
a: &'a Slice<T, Sa, La>,
b: &'a Slice<T, Sb, Lb>,
axes_a: &'a [usize],
axes_b: &'a [usize],
) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
fn contract_pairs<'a, Sa, Sb, La, Lb>( &self, a: &'a Slice<T, Sa, La>, b: &'a Slice<T, Sb, Lb>, axes_a: &'a [usize], axes_b: &'a [usize], ) -> impl ContractBuilder<'a, T, Sa, Sb, La, Lb>
Contracts explicit pairs of axes. Read more
Source§impl<T, D0: Dim, D1: Dim> QR<T, D0, D1> for Naive
impl<T, D0: Dim, D1: Dim> QR<T, D0, D1> for Naive
Source§impl<T: ComplexFloat + Add<Output = T> + Mul<Output = T> + Zero + Copy, D: Dim> VecOps<T, D> for Naive
impl<T: ComplexFloat + Add<Output = T> + Mul<Output = T> + Zero + Copy, D: Dim> VecOps<T, D> for Naive
Source§type Real = <T as ComplexFloat>::Real
type Real = <T as ComplexFloat>::Real
Real scalar type used for norm results and real rotation coefficients. Read more
Source§fn add_to_scaled<Lx: Layout, Ly: Layout>(
&self,
alpha: T,
x: &Slice<T, (D,), Lx>,
y: &mut Slice<T, (D,), Ly>,
)
fn add_to_scaled<Lx: Layout, Ly: Layout>( &self, alpha: T, x: &Slice<T, (D,), Lx>, y: &mut Slice<T, (D,), Ly>, )
Accumulate a scaled vector:
y := α·x + ySource§fn dot<Lx: Layout, Ly: Layout>(
&self,
x: &Slice<T, (D,), Lx>,
y: &Slice<T, (D,), Ly>,
) -> T
fn dot<Lx: Layout, Ly: Layout>( &self, x: &Slice<T, (D,), Lx>, y: &Slice<T, (D,), Ly>, ) -> T
Dot product:
∑xᵢyᵢSource§fn dotc<Lx: Layout, Ly: Layout>(
&self,
x: &Slice<T, (D,), Lx>,
y: &Slice<T, (D,), Ly>,
) -> T
fn dotc<Lx: Layout, Ly: Layout>( &self, x: &Slice<T, (D,), Lx>, y: &Slice<T, (D,), Ly>, ) -> T
Conjugated dot product:
∑conj(xᵢ) * yᵢ (BLAS convention)Auto Trait Implementations§
impl Freeze for Naive
impl RefUnwindSafe for Naive
impl Send for Naive
impl Sync for Naive
impl Unpin for Naive
impl UnsafeUnpin for Naive
impl UnwindSafe for Naive
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoCloned<T> for T
impl<T> IntoCloned<T> for 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