#[repr(u8)]pub enum DLDataTypeCode {
Int = 0,
UInt = 1,
Float = 2,
OpaqueHandle = 3,
Bfloat = 4,
Complex = 5,
Bool = 6,
}Expand description
Data type codes as defined by DLPack.
These correspond to DLDataTypeCode in the DLPack specification.
Variants§
Int = 0
Signed integer
UInt = 1
Unsigned integer
Float = 2
IEEE floating point
OpaqueHandle = 3
Opaque handle type (not for computation)
Bfloat = 4
Bfloat16 (Brain Floating Point)
Complex = 5
Complex numbers
Bool = 6
Boolean
Implementations§
Trait Implementations§
Source§impl Clone for DLDataTypeCode
impl Clone for DLDataTypeCode
Source§fn clone(&self) -> DLDataTypeCode
fn clone(&self) -> DLDataTypeCode
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 DLDataTypeCode
impl Debug for DLDataTypeCode
Source§impl Hash for DLDataTypeCode
impl Hash for DLDataTypeCode
Source§impl PartialEq for DLDataTypeCode
impl PartialEq for DLDataTypeCode
impl Copy for DLDataTypeCode
impl Eq for DLDataTypeCode
impl StructuralPartialEq for DLDataTypeCode
Auto Trait Implementations§
impl Freeze for DLDataTypeCode
impl RefUnwindSafe for DLDataTypeCode
impl Send for DLDataTypeCode
impl Sync for DLDataTypeCode
impl Unpin for DLDataTypeCode
impl UnwindSafe for DLDataTypeCode
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