pub trait MatMatMul: Debug + Display + DynClone + Send + Sync + Any {
Show 13 methods
// Required methods
fn kernel_name(&self) -> &'static str;
fn mr(&self) -> usize;
fn nr(&self) -> usize;
fn a_pack(&self) -> Packer;
fn b_pack(&self) -> Packer;
fn internal_type(&self) -> DatumType;
unsafe fn c_view(&self, m_axis: usize, n_axis: usize) -> OutputStoreSpec;
unsafe fn c_from_data_and_strides(
&self,
item_size: usize,
row_stride: isize,
col_stride: isize
) -> OutputStoreSpec;
fn can_fuse(&self, spec: &FusedSpec<'_>) -> bool;
unsafe fn allocate_scratch_space(&self) -> Box<dyn ScratchSpace>;
unsafe fn can_use_scratch_space(&self, scratch: &dyn ScratchSpace) -> bool;
unsafe fn run_with_scratch_space(
&self,
m: usize,
n: usize,
scratch: &mut dyn ScratchSpace,
non_linear: &[FusedSpec<'_>]
) -> Result<()>;
// Provided method
unsafe fn run(
&self,
m: usize,
n: usize,
non_linear: &[FusedSpec<'_>]
) -> Result<()> { ... }
}
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.