pub struct DLPackType {
pub code: u8,
pub bits: u8,
pub lanes: u16,
}Expand description
A DLPack DLDataType triple describing a tensor element type.
Fields§
§code: u8DLDataTypeCode (0 = int, 1 = uint, 2 = float, 4 = bfloat, 6 = bool).
bits: u8Element width in bits.
lanes: u16Vector lanes; always 1 for RLMesh tensors.
Trait Implementations§
Source§impl Clone for DLPackType
impl Clone for DLPackType
Source§fn clone(&self) -> DLPackType
fn clone(&self) -> DLPackType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DLPackType
Source§impl Debug for DLPackType
impl Debug for DLPackType
impl Eq for DLPackType
Source§impl Hash for DLPackType
impl Hash for DLPackType
Source§impl PartialEq for DLPackType
impl PartialEq for DLPackType
Source§fn eq(&self, other: &DLPackType) -> bool
fn eq(&self, other: &DLPackType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DLPackType
Auto Trait Implementations§
impl Freeze for DLPackType
impl RefUnwindSafe for DLPackType
impl Send for DLPackType
impl Sync for DLPackType
impl Unpin for DLPackType
impl UnsafeUnpin for DLPackType
impl UnwindSafe for DLPackType
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