Trait microgemm::Kernel

source ·
pub trait Kernelwhere
    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: impl AsMut<[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: impl AsMut<[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 Generic2x2Kernel<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 Generic4x4Kernel<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 Generic8x8Kernel<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 Generic16x16Kernel<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 Generic32x32Kernel<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>