Trait 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: PackSizes, packing_buf: &mut [Self::Scalar], ) { ... } fn mr(&self) -> usize { ... } fn nr(&self) -> usize { ... } }

Provided Associated Constants§

Source

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

Source

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

Required Associated Types§

Source

type Scalar

Source

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

Source

type Nr: ArrayLength

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: PackSizes, packing_buf: &mut [Self::Scalar], )

Source

fn mr(&self) -> usize

Source

fn nr(&self) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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>,

Source§

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

Source§

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

Source§

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

Source§

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