pub struct PackedFormat {
pub dt: DatumType,
pub r: usize,
pub alignment_bytes: usize,
pub end_padding_record: usize,
}Fields§
§dt: DatumType§r: usize§alignment_bytes: usize§end_padding_record: usizeImplementations§
Source§impl PackedFormat
impl PackedFormat
pub const fn new( dt: DatumType, nr: usize, alignment_bytes: usize, ) -> PackedFormat
pub const fn with_end_padding_record( self, end_padding_record: usize, ) -> PackedFormat
pub fn align(self, alignment: usize) -> PackedFormat
pub fn alignment(&self) -> usize
pub fn panel_width(&self) -> usize
pub fn len<D>(&self, k: D, n: D) -> Dwhere
D: DimLike,
pub fn single_panel_len<D>(&self, k: D) -> Dwhere
D: DimLike,
pub fn single_panel_layout(&self, k: usize, item_size: usize) -> Layout
pub fn pack_tensor( &self, t: &Tensor, k_axis: usize, mn_axis: usize, ) -> Result<Box<dyn MMMInputValue>, Error>
pub fn pack_tensor_view( &self, t: &TensorView<'_>, k_axis: usize, mn_axis: usize, ) -> Result<Box<dyn MMMInputValue>, Error>
pub unsafe fn pack<'a, 'b>( &self, pb: impl BorrowMut<TensorView<'a>>, b: impl Borrow<TensorView<'b>>, k_axis: usize, mn_axis: usize, )
pub unsafe fn pack_t<T>( &self, pb: *mut T, b: *const T, mn: usize, k_stride: isize, mn_stride: isize, k_range: Range<usize>, mn_range: Range<usize>, )
pub unsafe fn pack_segment<'a, 'b>( &self, pb: impl BorrowMut<TensorView<'a>>, b: impl Borrow<TensorView<'b>>, k_axis: usize, mn_axis: usize, k_range: Range<usize>, mn_range: Range<usize>, )
pub fn write_with_k_outer<'p, T>( &self, pb: *mut T, k: usize, mn: usize, ) -> KOutWriter<'p, T>
pub fn write_single_panel_with_k_outer<'p, T>( &self, pb: *mut T, ) -> KOutSinglePanelWriter<'p, T>
pub fn write_with_k_inner<'p, T>( &self, pb: *mut T, k: usize, mn: usize, ) -> KInWriter<'p, T>
Trait Implementations§
Source§impl Clone for PackedFormat
impl Clone for PackedFormat
Source§fn clone(&self) -> PackedFormat
fn clone(&self) -> PackedFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackedFormat
impl Debug for PackedFormat
Source§impl Display for PackedFormat
impl Display for PackedFormat
Source§impl Hash for PackedFormat
impl Hash for PackedFormat
Source§impl MMMInputFormat for PackedFormat
impl MMMInputFormat for PackedFormat
fn prepare_tensor( &self, t: &Tensor, k_axis: usize, mn_axis: usize, ) -> Result<Tensor, Error>
fn prepare_one( &self, t: &Tensor, k_axis: usize, mn_axis: usize, ) -> Result<Box<dyn MMMInputValue>, Error>
fn precursor(&self) -> WeightType
fn r(&self) -> usize
fn k_alignment(&self) -> usize
fn same_as(&self, other: &(dyn MMMInputFormat + 'static)) -> bool
fn merge_with<'o, 'a, 'b>(
&'a self,
other: &'b (dyn MMMInputFormat + 'static),
) -> Option<&'o (dyn MMMInputFormat + 'static)>where
'a: 'o,
'b: 'o,
fn mem_size(&self, k: TDim, mn: TDim) -> TDim
fn extract_at_mn_f16( &self, data: &EagerPackedInput, mn: usize, slice: &mut [f16], ) -> Result<(), Error>
fn extract_at_mn_f32( &self, data: &EagerPackedInput, mn: usize, slice: &mut [f32], ) -> Result<(), Error>
Source§impl PartialEq for PackedFormat
impl PartialEq for PackedFormat
impl Eq for PackedFormat
impl StructuralPartialEq for PackedFormat
Auto Trait Implementations§
impl Freeze for PackedFormat
impl RefUnwindSafe for PackedFormat
impl Send for PackedFormat
impl Sync for PackedFormat
impl Unpin for PackedFormat
impl UnwindSafe for PackedFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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