Trait TensorKernels
pub trait TensorKernels<H>where
H: Copy,{
type Error;
// Required methods
fn decode_row_into(
&mut self,
tensor: TensorBinding<H>,
row: usize,
out: &mut [f32],
) -> Result<usize, Self::Error>;
fn gemv_into(
&mut self,
tensor: TensorBinding<H>,
input: &[f32],
out: &mut [f32],
) -> Result<(), Self::Error>;
}Expand description
Implementations must decode the bound immutable tensors and allocate no hot storage. Calls receive the original used buffer lengths, excluding spare capacity. The trait is an execution boundary, not authentication of an implementation.
Required Associated Types§
type Error
Required Methods§
fn decode_row_into( &mut self, tensor: TensorBinding<H>, row: usize, out: &mut [f32], ) -> Result<usize, Self::Error>
fn gemv_into( &mut self, tensor: TensorBinding<H>, input: &[f32], out: &mut [f32], ) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".