Trait microgemm::Kernel

source ·
pub trait Kernel
where Self::Scalar: Copy + Zero + One,
{ type Scalar; type Mr: ArrayLength + Multiply<Self::Nr>; type Nr: ArrayLength; const MR: usize = <Self::Mr>::USIZE; const NR: usize = <Self::Nr>::USIZE; // Required method fn microkernel( &self, alpha: Self::Scalar, lhs: &MatRef<'_, Self::Scalar>, rhs: &MatRef<'_, Self::Scalar>, beta: Self::Scalar, dst: &mut MatMut<'_, Self::Scalar> ); // Provided methods fn gemm( &self, alpha: Self::Scalar, a: &MatRef<'_, Self::Scalar>, b: &MatRef<'_, Self::Scalar>, beta: Self::Scalar, c: &mut MatMut<'_, Self::Scalar>, pack_sizes: impl AsRef<PackSizes>, packing_buf: &mut [Self::Scalar] ) { ... } fn mr(&self) -> usize { ... } fn nr(&self) -> usize { ... } }

Required Associated Types§

source

type Scalar

source

type Mr: ArrayLength + Multiply<Self::Nr>

source

type Nr: ArrayLength

Provided Associated Constants§

source

const MR: usize = <Self::Mr>::USIZE

source

const NR: usize = <Self::Nr>::USIZE

Required Methods§

source

fn microkernel( &self, alpha: Self::Scalar, lhs: &MatRef<'_, Self::Scalar>, rhs: &MatRef<'_, Self::Scalar>, beta: Self::Scalar, dst: &mut MatMut<'_, Self::Scalar> )

Provided Methods§

source

fn gemm( &self, alpha: Self::Scalar, a: &MatRef<'_, Self::Scalar>, b: &MatRef<'_, Self::Scalar>, beta: Self::Scalar, c: &mut MatMut<'_, Self::Scalar>, pack_sizes: impl AsRef<PackSizes>, packing_buf: &mut [Self::Scalar] )

source

fn mr(&self) -> usize

source

fn nr(&self) -> usize

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Kernel for GenericKernel2x2<T>
where T: Copy + Zero + One + Add<Output = T> + Mul<Output = T>,

§

type Scalar = T

§

type Mr = UInt<UInt<UTerm, B1>, B0>

§

type Nr = UInt<UInt<UTerm, B1>, B0>

source§

impl<T> Kernel for GenericKernel4x4<T>
where T: Copy + Zero + One + Add<Output = T> + Mul<Output = T>,

§

type Scalar = T

§

type Mr = UInt<UInt<UInt<UTerm, B1>, B0>, B0>

§

type Nr = UInt<UInt<UInt<UTerm, B1>, B0>, B0>

source§

impl<T> Kernel for GenericKernel8x8<T>
where T: Copy + Zero + One + Add<Output = T> + Mul<Output = T>,

§

type Scalar = T

§

type Mr = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

§

type Nr = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

source§

impl<T> Kernel for GenericKernel16x16<T>
where T: Copy + Zero + One + Add<Output = T> + Mul<Output = T>,

§

type Scalar = T

§

type Mr = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

§

type Nr = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

source§

impl<T> Kernel for GenericKernel32x32<T>
where T: Copy + Zero + One + Add<Output = T> + Mul<Output = T>,

§

type Scalar = T

§

type Mr = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>

§

type Nr = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>