pub struct Cpu;
Expand description
The CPU device
Implementations
Trait Implementations
sourceimpl AllocateZeros for Cpu
impl AllocateZeros for Cpu
sourcefn zeros<T: CountElements>() -> Box<T>
fn zeros<T: CountElements>() -> Box<T>
Allocates using alloc_zeroed.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> Device<[[[[f32; P]; O]; N]; M]> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> Device<[[[[f32; P]; O]; N]; M]> for Cpu
sourcefn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
fn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
Allocate a new T
and then store f
applied to t
in the new T
. Uses ForEachElement::foreach_mr.
sourcefn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
fn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
Computes lhs += rhs
, using ForEachElement::foreach_mr.
sourceimpl<const M: usize, const N: usize, const O: usize> Device<[[[f32; O]; N]; M]> for Cpu
impl<const M: usize, const N: usize, const O: usize> Device<[[[f32; O]; N]; M]> for Cpu
sourcefn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
fn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
Allocate a new T
and then store f
applied to t
in the new T
. Uses ForEachElement::foreach_mr.
sourcefn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
fn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
Computes lhs += rhs
, using ForEachElement::foreach_mr.
sourceimpl<const M: usize, const N: usize> Device<[[f32; N]; M]> for Cpu
impl<const M: usize, const N: usize> Device<[[f32; N]; M]> for Cpu
sourcefn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
fn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
Allocate a new T
and then store f
applied to t
in the new T
. Uses ForEachElement::foreach_mr.
sourcefn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
fn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
Computes lhs += rhs
, using ForEachElement::foreach_mr.
sourceimpl<const M: usize> Device<[f32; M]> for Cpu
impl<const M: usize> Device<[f32; M]> for Cpu
sourcefn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
fn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
Allocate a new T
and then store f
applied to t
in the new T
. Uses ForEachElement::foreach_mr.
sourcefn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
fn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
Computes lhs += rhs
, using ForEachElement::foreach_mr.
sourceimpl Device<f32> for Cpu
impl Device<f32> for Cpu
sourcefn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
fn map<F: FnMut(&T::Dtype) -> T::Dtype>(t: &T, f: F) -> Box<T>
Allocate a new T
and then store f
applied to t
in the new T
. Uses ForEachElement::foreach_mr.
sourcefn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
fn add(lhs: &mut T, rhs: &T) where
T::Dtype: for<'r> AddAssign<&'r T::Dtype> + Copy,
Computes lhs += rhs
, using ForEachElement::foreach_mr.
sourceimpl<T: CountElements, const M: usize> FillElements<[T; M]> for Cpu where
Self: FillElements<T>,
impl<T: CountElements, const M: usize> FillElements<[T; M]> for Cpu where
Self: FillElements<T>,
sourceimpl FillElements<f32> for Cpu
impl FillElements<f32> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; O]; N]; M], [[[[f32; P]; O]; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; O]; N]; M], [[[[f32; P]; O]; N]; M], -1> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[[f32; O]; N]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[[f32; O]; N]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; O]; N]; M], [[[[f32; P]; O]; N]; M], 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; O]; N]; M], [[[[f32; P]; O]; N]; M], 3> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[[f32; O]; N]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[[f32; O]; N]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; P]; N]; M], [[[[f32; P]; O]; N]; M], 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; P]; N]; M], [[[[f32; P]; O]; N]; M], 2> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[[f32; P]; N]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[[f32; P]; N]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; P]; O]; M], [[[[f32; P]; O]; N]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; P]; O]; M], [[[[f32; P]; O]; N]; M], 1> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[[f32; P]; O]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[[f32; P]; O]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; P]; O]; N], [[[[f32; P]; O]; N]; M], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast1<[[[f32; P]; O]; N], [[[[f32; P]; O]; N]; M], 0> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[[f32; P]; O]; N],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[[f32; P]; O]; N],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; N]; M], [[[f32; O]; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; N]; M], [[[f32; O]; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; N]; M], [[[f32; O]; N]; M], 2> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; N]; M], [[[f32; O]; N]; M], 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; O]; M], [[[f32; O]; N]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; O]; M], [[[f32; O]; N]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; O]; N], [[[f32; O]; N]; M], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast1<[[f32; O]; N], [[[f32; O]; N]; M], 0> for Cpu
sourceimpl ForEachBroadcast1<f32, f32, -1> for Cpu
impl ForEachBroadcast1<f32, f32, -1> for Cpu
sourceimpl ForEachBroadcast1<f32, f32, 0> for Cpu
impl ForEachBroadcast1<f32, f32, 0> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; N]; M], [[[[f32; P]; O]; N]; M], 2, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; N]; M], [[[[f32; P]; O]; N]; M], 2, 3> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[f32; N]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[f32; N]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; O]; M], [[[[f32; P]; O]; N]; M], 1, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; O]; M], [[[[f32; P]; O]; N]; M], 1, 3> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[f32; O]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[f32; O]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; O]; N], [[[[f32; P]; O]; N]; M], 0, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; O]; N], [[[[f32; P]; O]; N]; M], 0, 3> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[f32; O]; N],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[f32; O]; N],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; P]; M], [[[[f32; P]; O]; N]; M], 1, 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; P]; M], [[[[f32; P]; O]; N]; M], 1, 2> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[f32; P]; M],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[f32; P]; M],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; P]; N], [[[[f32; P]; O]; N]; M], 0, 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; P]; N], [[[[f32; P]; O]; N]; M], 0, 2> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[f32; P]; N],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[f32; P]; N],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; P]; O], [[[[f32; P]; O]; N]; M], 0, 1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast2<[[f32; P]; O], [[[[f32; P]; O]; N]; M], 0, 1> for Cpu
fn foreach_mb<F: FnMut(&mut f32, &f32)>(
a: &mut [[f32; P]; O],
b: &[[[[f32; P]; O]; N]; M],
f: &mut F
)
fn foreach_br<F: FnMut(&mut f32, &f32)>(
a: &mut [[[[f32; P]; O]; N]; M],
b: &[[f32; P]; O],
f: &mut F
)
fn broadcast_copy(a: &mut Lg, b: &Sm)
fn broadcast_add(a: &mut Sm, b: &Lg)
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast2<[f32; M], [[[f32; O]; N]; M], 1, 2> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast2<[f32; M], [[[f32; O]; N]; M], 1, 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast2<[f32; N], [[[f32; O]; N]; M], 0, 2> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast2<[f32; N], [[[f32; O]; N]; M], 0, 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast2<[f32; O], [[[f32; O]; N]; M], 0, 1> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast2<[f32; O], [[[f32; O]; N]; M], 0, 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; M], [[[[f32; P]; O]; N]; M], 1, 2, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; M], [[[[f32; P]; O]; N]; M], 1, 2, 3> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; N], [[[[f32; P]; O]; N]; M], 0, 2, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; N], [[[[f32; P]; O]; N]; M], 0, 2, 3> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; O], [[[[f32; P]; O]; N]; M], 0, 1, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; O], [[[[f32; P]; O]; N]; M], 0, 1, 3> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; P], [[[[f32; P]; O]; N]; M], 0, 1, 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast3<[f32; P], [[[[f32; P]; O]; N]; M], 0, 1, 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> ForEachBroadcast3<f32, [[[f32; O]; N]; M], 0, 1, 2> for Cpu
impl<const M: usize, const N: usize, const O: usize> ForEachBroadcast3<f32, [[[f32; O]; N]; M], 0, 1, 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast4<f32, [[[[f32; P]; O]; N]; M], 0, 1, 2, 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> ForEachBroadcast4<f32, [[[[f32; P]; O]; N]; M], 0, 1, 2, 3> for Cpu
sourceimpl<T: CountElements, const M: usize> ForEachElement<[T; M]> for Cpu where
Self: ForEachElement<T>,
impl<T: CountElements, const M: usize> ForEachElement<[T; M]> for Cpu where
Self: ForEachElement<T>,
sourcefn foreach_m<F: FnMut(&mut <[T; M] as CountElements>::Dtype)>(
a: &mut [T; M],
f: &mut F
)
fn foreach_m<F: FnMut(&mut <[T; M] as CountElements>::Dtype)>(
a: &mut [T; M],
f: &mut F
)
Mutate elements of a
by applying f
to all elements of a.
sourcefn foreach_mm<F>(a: &mut [T; M], b: &mut [T; M], f: &mut F) where
F: FnMut(&mut T::Dtype, &mut T::Dtype),
fn foreach_mm<F>(a: &mut [T; M], b: &mut [T; M], f: &mut F) where
F: FnMut(&mut T::Dtype, &mut T::Dtype),
Mutate elements of a
and b
by applying f
to all elements of (a, b).
mm
stands for mut mut Read more
sourcefn foreach_mr<F>(a: &mut [T; M], b: &[T; M], f: &mut F) where
F: FnMut(&mut T::Dtype, &T::Dtype),
fn foreach_mr<F>(a: &mut [T; M], b: &[T; M], f: &mut F) where
F: FnMut(&mut T::Dtype, &T::Dtype),
Mutate elements of a
by applying f
to all elements of (a, b).
mr
stands for mut ref Read more
sourceimpl ForEachElement<f32> for Cpu
impl ForEachElement<f32> for Cpu
sourcefn foreach_m<F: FnMut(&mut <f32 as CountElements>::Dtype)>(
a: &mut f32,
f: &mut F
)
fn foreach_m<F: FnMut(&mut <f32 as CountElements>::Dtype)>(
a: &mut f32,
f: &mut F
)
Mutate elements of a
by applying f
to all elements of a.
sourcefn foreach_mm<F: FnMut(&mut f32, &mut f32)>(a: &mut f32, b: &mut f32, f: &mut F)
fn foreach_mm<F: FnMut(&mut f32, &mut f32)>(a: &mut f32, b: &mut f32, f: &mut F)
Mutate elements of a
and b
by applying f
to all elements of (a, b).
mm
stands for mut mut Read more
sourcefn foreach_mr<F: FnMut(&mut f32, &f32)>(a: &mut f32, b: &f32, f: &mut F)
fn foreach_mr<F: FnMut(&mut f32, &f32)>(a: &mut f32, b: &f32, f: &mut F)
Mutate elements of a
by applying f
to all elements of (a, b).
mr
stands for mut ref Read more
sourceimpl<const BATCH: usize, const M: usize, const K: usize, const N: usize> MatMul<[[[f32; K]; M]; BATCH], [[[f32; N]; K]; BATCH], [[f32; N]; M]> for Cpu where
Self: MatMul<[[f32; K]; M], [[f32; N]; K], [[f32; N]; M]>,
impl<const BATCH: usize, const M: usize, const K: usize, const N: usize> MatMul<[[[f32; K]; M]; BATCH], [[[f32; N]; K]; BATCH], [[f32; N]; M]> for Cpu where
Self: MatMul<[[f32; K]; M], [[f32; N]; K], [[f32; N]; M]>,
sourcefn mm(
a: &[[[f32; K]; M]; BATCH],
b: &[[[f32; N]; K]; BATCH],
c: &mut [[f32; N]; M]
)
fn mm(
a: &[[[f32; K]; M]; BATCH],
b: &[[[f32; N]; K]; BATCH],
c: &mut [[f32; N]; M]
)
Broadcast c
BATCH
times.
sourcefn mm_at(
a: &[[[f32; M]; K]; BATCH],
b: &[[[f32; N]; K]; BATCH],
c: &mut [[f32; N]; M]
)
fn mm_at(
a: &[[[f32; M]; K]; BATCH],
b: &[[[f32; N]; K]; BATCH],
c: &mut [[f32; N]; M]
)
Broadcast c
BATCH
times.
sourceimpl<const BATCH: usize, const M: usize, const K: usize, const N: usize> MatMul<[[[f32; K]; M]; BATCH], [[f32; N]; K], [[[f32; N]; M]; BATCH]> for Cpu where
Self: MatMul<[[f32; K]; M], [[f32; N]; K], [[f32; N]; M]>,
impl<const BATCH: usize, const M: usize, const K: usize, const N: usize> MatMul<[[[f32; K]; M]; BATCH], [[f32; N]; K], [[[f32; N]; M]; BATCH]> for Cpu where
Self: MatMul<[[f32; K]; M], [[f32; N]; K], [[f32; N]; M]>,
sourcefn mm(
a: &[[[f32; K]; M]; BATCH],
b: &[[f32; N]; K],
c: &mut [[[f32; N]; M]; BATCH]
)
fn mm(
a: &[[[f32; K]; M]; BATCH],
b: &[[f32; N]; K],
c: &mut [[[f32; N]; M]; BATCH]
)
Broadcast b
BATCH
times.
sourcefn mm_at(
a: &[[[f32; M]; K]; BATCH],
b: &[[f32; N]; K],
c: &mut [[[f32; N]; M]; BATCH]
)
fn mm_at(
a: &[[[f32; M]; K]; BATCH],
b: &[[f32; N]; K],
c: &mut [[[f32; N]; M]; BATCH]
)
Broadcast b
BATCH
times.
sourceimpl<const M: usize, const K: usize, const N: usize> MatMul<[[f32; K]; M], [[f32; N]; K], [[f32; N]; M]> for Cpu
impl<const M: usize, const K: usize, const N: usize> MatMul<[[f32; K]; M], [[f32; N]; K], [[f32; N]; M]> for Cpu
sourceimpl<const BATCH: usize, A, B, C> MatMul<[A; BATCH], [B; BATCH], [C; BATCH]> for Cpu where
Self: MatMul<A, B, C>,
A: Transpose,
B: Transpose,
C: Transpose,
[A; BATCH]: Transpose<T = [A::T; BATCH]>,
[B; BATCH]: Transpose<T = [B::T; BATCH]>,
[C; BATCH]: Transpose<T = [C::T; BATCH]>,
impl<const BATCH: usize, A, B, C> MatMul<[A; BATCH], [B; BATCH], [C; BATCH]> for Cpu where
Self: MatMul<A, B, C>,
A: Transpose,
B: Transpose,
C: Transpose,
[A; BATCH]: Transpose<T = [A::T; BATCH]>,
[B; BATCH]: Transpose<T = [B::T; BATCH]>,
[C; BATCH]: Transpose<T = [C::T; BATCH]>,
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; O]; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; O]; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; O]; N]; M], 3> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; O]; N]; M], 3> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; P]; N]; M], 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; P]; N]; M], 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; P]; O]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; P]; O]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; P]; O]; N], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> Reduce1Axis<[[[[f32; P]; O]; N]; M], [[[f32; P]; O]; N], 0> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; N]; M], 2> for Cpu
impl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; N]; M], 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; O]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; O]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; O]; N], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize> Reduce1Axis<[[[f32; O]; N]; M], [[f32; O]; N], 0> for Cpu
sourceimpl Reduce1Axis<f32, f32, -1> for Cpu
impl Reduce1Axis<f32, f32, -1> for Cpu
sourceimpl Reduce1Axis<f32, f32, 0> for Cpu
impl Reduce1Axis<f32, f32, 0> for Cpu
sourceimpl<T: CountElements, const M: usize> ReduceAllElements<[T; M]> for Cpu where
Self: ReduceAllElements<T>,
impl<T: CountElements, const M: usize> ReduceAllElements<[T; M]> for Cpu where
Self: ReduceAllElements<T>,
sourceimpl ReduceAllElements<f32> for Cpu
impl ReduceAllElements<f32> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[[[usize; Z]; O]; N]; M], [[[[f32; Z]; O]; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[[[usize; Z]; O]; N]; M], [[[[f32; Z]; O]; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[[usize; O]; N]; M], [[[f32; O]; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[[usize; O]; N]; M], [[[f32; O]; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[[usize; Z]; N]; M], [[[[f32; P]; Z]; N]; M], 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[[usize; Z]; N]; M], [[[[f32; P]; Z]; N]; M], 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[usize; N]; M], [[[f32; P]; N]; M], 2> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[usize; N]; M], [[[f32; P]; N]; M], 2> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[usize; Z]; M], [[[[f32; P]; O]; Z]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [[usize; Z]; M], [[[[f32; P]; O]; Z]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [usize; M], [[[f32; P]; O]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [usize; M], [[[f32; P]; O]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [usize; Z], [[[[f32; P]; O]; N]; Z], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize, const Z: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], [usize; Z], [[[[f32; P]; O]; N]; Z], 0> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], usize, [[[f32; P]; O]; N], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize, const P: usize> SelectAlongAxis<[[[[f32; P]; O]; N]; M], usize, [[[f32; P]; O]; N], 0> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const Z: usize> SelectAlongAxis<[[[f32; O]; N]; M], [[[usize; Z]; N]; M], [[[f32; Z]; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const Z: usize> SelectAlongAxis<[[[f32; O]; N]; M], [[[usize; Z]; N]; M], [[[f32; Z]; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> SelectAlongAxis<[[[f32; O]; N]; M], [[usize; N]; M], [[f32; N]; M], -1> for Cpu
impl<const M: usize, const N: usize, const O: usize> SelectAlongAxis<[[[f32; O]; N]; M], [[usize; N]; M], [[f32; N]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const Z: usize> SelectAlongAxis<[[[f32; O]; N]; M], [[usize; Z]; M], [[[f32; O]; Z]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize, const Z: usize> SelectAlongAxis<[[[f32; O]; N]; M], [[usize; Z]; M], [[[f32; O]; Z]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> SelectAlongAxis<[[[f32; O]; N]; M], [usize; M], [[f32; O]; M], 1> for Cpu
impl<const M: usize, const N: usize, const O: usize> SelectAlongAxis<[[[f32; O]; N]; M], [usize; M], [[f32; O]; M], 1> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize, const Z: usize> SelectAlongAxis<[[[f32; O]; N]; M], [usize; Z], [[[f32; O]; N]; Z], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize, const Z: usize> SelectAlongAxis<[[[f32; O]; N]; M], [usize; Z], [[[f32; O]; N]; Z], 0> for Cpu
sourceimpl<const M: usize, const N: usize, const O: usize> SelectAlongAxis<[[[f32; O]; N]; M], usize, [[f32; O]; N], 0> for Cpu
impl<const M: usize, const N: usize, const O: usize> SelectAlongAxis<[[[f32; O]; N]; M], usize, [[f32; O]; N], 0> for Cpu
sourceimpl<const M: usize, const N: usize, const Z: usize> SelectAlongAxis<[[f32; N]; M], [[usize; Z]; M], [[f32; Z]; M], -1> for Cpu
impl<const M: usize, const N: usize, const Z: usize> SelectAlongAxis<[[f32; N]; M], [[usize; Z]; M], [[f32; Z]; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize> SelectAlongAxis<[[f32; N]; M], [usize; M], [f32; M], -1> for Cpu
impl<const M: usize, const N: usize> SelectAlongAxis<[[f32; N]; M], [usize; M], [f32; M], -1> for Cpu
sourceimpl<const M: usize, const N: usize, const Z: usize> SelectAlongAxis<[[f32; N]; M], [usize; Z], [[f32; N]; Z], 0> for Cpu
impl<const M: usize, const N: usize, const Z: usize> SelectAlongAxis<[[f32; N]; M], [usize; Z], [[f32; N]; Z], 0> for Cpu
sourceimpl<const M: usize, const N: usize> SelectAlongAxis<[[f32; N]; M], usize, [f32; N], 0> for Cpu
impl<const M: usize, const N: usize> SelectAlongAxis<[[f32; N]; M], usize, [f32; N], 0> for Cpu
sourceimpl<const M: usize, const Z: usize> SelectAlongAxis<[f32; M], [usize; Z], [f32; Z], -1> for Cpu
impl<const M: usize, const Z: usize> SelectAlongAxis<[f32; M], [usize; Z], [f32; Z], -1> for Cpu
impl<A: Transpose, B: Transpose, C: Transpose> MatMulOp<A, B, C> for Cpu where
Self: MatMul<A, B, C> + MatMul<C, B::T, A> + MatMul<A::T, C, B>,
Auto Trait Implementations
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnwindSafe for Cpu
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more