DynKernel

Struct DynKernel 

Source
pub struct DynKernel<const MR: usize, const NR: usize, Acc>
where Acc: LADatum,
{ pub name: String, pub kernel: unsafe fn(&[FusedKerSpec<Acc>]) -> isize, pub quality: ImplementationQuality, pub packings: Vec<(Box<dyn MMMInputFormat>, Box<dyn MMMInputFormat>)>, pub stores: Vec<DatumType>, pub supported_predicate: fn() -> bool, pub boost: fn() -> isize, pub can_fuse: fn(&FusedSpec<'_>) -> bool, }

Fields§

§name: String§kernel: unsafe fn(&[FusedKerSpec<Acc>]) -> isize§quality: ImplementationQuality§packings: Vec<(Box<dyn MMMInputFormat>, Box<dyn MMMInputFormat>)>§stores: Vec<DatumType>§supported_predicate: fn() -> bool§boost: fn() -> isize§can_fuse: fn(&FusedSpec<'_>) -> bool

Implementations§

Source§

impl<const MR: usize, const NR: usize, Acc> DynKernel<MR, NR, Acc>
where Acc: LADatum,

Source

pub fn new( name: &str, kernel: unsafe fn(&[FusedKerSpec<Acc>]) -> isize, packing_a: PackedFormat, packing_b: PackedFormat, quality: ImplementationQuality, ) -> DynKernel<MR, NR, Acc>

Source

pub fn with_platform_condition(self, f: fn() -> bool) -> DynKernel<MR, NR, Acc>

Source

pub fn with_boost(self, f: fn() -> isize) -> DynKernel<MR, NR, Acc>

Source

pub fn with_packing( self, a: impl MMMInputFormat, b: impl MMMInputFormat, ) -> DynKernel<MR, NR, Acc>

Source

pub fn with_packing_a(self, a: impl MMMInputFormat) -> DynKernel<MR, NR, Acc>

Source

pub fn regular_pack_a(&self) -> PackedFormat

Source

pub fn regular_pack_b(&self) -> PackedFormat

Source

pub fn with_can_fuse( self, can_fuse: fn(&FusedSpec<'_>) -> bool, ) -> DynKernel<MR, NR, Acc>

Source

pub fn with_store<D>(self) -> DynKernel<MR, NR, Acc>
where D: LADatum,

Source

pub fn mmm(&self) -> Box<dyn MatMatMul>

Trait Implementations§

Source§

impl<const MR: usize, const NR: usize, Acc> Clone for DynKernel<MR, NR, Acc>
where Acc: Clone + LADatum,

Source§

fn clone(&self) -> DynKernel<MR, NR, Acc>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const MR: usize, const NR: usize, Acc> Debug for DynKernel<MR, NR, Acc>
where Acc: LADatum,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<const MR: usize, const NR: usize, Acc> MatMatMulKer for DynKernel<MR, NR, Acc>
where Acc: LADatum,

Source§

type Acc = Acc

Source§

fn name(&self) -> &str

Source§

fn mr(&self) -> usize

Source§

fn nr(&self) -> usize

Source§

fn quality(&self) -> ImplementationQuality

Source§

fn is_supported_here(&self) -> bool

Source§

fn can_fuse(&self, spec: &FusedSpec<'_>) -> bool

Source§

fn kernel( &self, op: &[FusedKerSpec<<DynKernel<MR, NR, Acc> as MatMatMulKer>::Acc>], ) -> isize

Source§

fn packings(&self) -> &[(Box<dyn MMMInputFormat>, Box<dyn MMMInputFormat>)]

Source§

fn stores(&self) -> Cow<'_, [DatumType]>

Source§

fn dynamic_boost(&self) -> isize

Auto Trait Implementations§

§

impl<const MR: usize, const NR: usize, Acc> Freeze for DynKernel<MR, NR, Acc>

§

impl<const MR: usize, const NR: usize, Acc> !RefUnwindSafe for DynKernel<MR, NR, Acc>

§

impl<const MR: usize, const NR: usize, Acc> Send for DynKernel<MR, NR, Acc>

§

impl<const MR: usize, const NR: usize, Acc> Sync for DynKernel<MR, NR, Acc>

§

impl<const MR: usize, const NR: usize, Acc> Unpin for DynKernel<MR, NR, Acc>

§

impl<const MR: usize, const NR: usize, Acc> !UnwindSafe for DynKernel<MR, NR, Acc>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<K> MatMatMul for K
where K: MatMatMulKer,

Source§

fn name(&self) -> &str

Source§

fn mr(&self) -> usize

Source§

fn nr(&self) -> usize

Source§

fn quality(&self) -> ImplementationQuality

Source§

fn dynamic_boost(&self) -> isize

Source§

fn packings(&self) -> &[(Box<dyn MMMInputFormat>, Box<dyn MMMInputFormat>)]

Source§

fn internal_type(&self) -> DatumType

Source§

fn can_fuse(&self, spec: &FusedSpec<'_>) -> bool

Source§

unsafe fn c_view( &self, m_axis: Option<usize>, n_axis: Option<usize>, ) -> OutputStoreSpec

Source§

unsafe fn c_from_data_and_strides( &self, item_size: usize, row_stride: isize, col_stride: isize, ) -> OutputStoreSpec

Source§

fn stores(&self) -> Cow<'_, [DatumType]>

Source§

unsafe fn allocate_scratch_space(&self) -> Box<dyn ScratchSpace>

Source§

unsafe fn can_use_scratch_space( &self, scratch: &(dyn ScratchSpace + 'static), ) -> bool

Source§

unsafe fn run_with_scratch_space( &self, m: usize, n: usize, scratch: &mut (dyn ScratchSpace + 'static), non_linear: &[FusedSpec<'_>], ) -> Result<(), Error>

Source§

unsafe fn run( &self, m: usize, n: usize, non_linear: &[FusedSpec<'_>], ) -> Result<(), Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Any for T
where T: Any,

Source§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

impl<T> CloneAnySend for T
where T: Any + Send + Clone,

Source§

impl<T> CloneAnySendSync for T
where T: Any + Send + Sync + Clone,

Source§

impl<T> CloneAnySync for T
where T: Any + Sync + Clone,