#[non_exhaustive]pub enum TensorDataType {
Show 14 variants
Int4,
Int8,
Int16,
Int32,
Int64,
Uint4,
Uint8,
Uint16,
Uint32,
Uint64,
Float16,
Float32,
Float64,
Bfloat16,
}
Expand description
Describe the type of data contain in the tensor.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Int4
signed 4 bit integer tensor data
Int8
signed 8 bit integer tensor data
Int16
signed 16 bit integer tensor data
Int32
signed 32 bit integer tensor data
Int64
signed 64 bit integer tensor data
Uint4
unsigned 4 bit integer tensor data
Uint8
unsigned 8 bit integer tensor data
Uint16
unsigned 16 bit integer tensor data
Uint32
unsigned 32 bit integer tensor data
Uint64
unsigned 64 bit integer tensor data
Float16
16 bit floating point tensor data
Float32
32 bit floating point tensor data
Float64
64 bit floating point tensor data
Bfloat16
“brain” 16 bit floating point tensor data
Trait Implementations§
Source§impl Clone for TensorDataType
impl Clone for TensorDataType
Source§fn clone(&self) -> TensorDataType
fn clone(&self) -> TensorDataType
Returns a copy 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 TensorDataType
impl Debug for TensorDataType
Source§impl Hash for TensorDataType
impl Hash for TensorDataType
Source§impl Ord for TensorDataType
impl Ord for TensorDataType
Source§fn cmp(&self, other: &TensorDataType) -> Ordering
fn cmp(&self, other: &TensorDataType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TensorDataType
impl PartialEq for TensorDataType
Source§impl PartialOrd for TensorDataType
impl PartialOrd for TensorDataType
impl Copy for TensorDataType
impl Eq for TensorDataType
impl StructuralPartialEq for TensorDataType
Auto Trait Implementations§
impl Freeze for TensorDataType
impl RefUnwindSafe for TensorDataType
impl Send for TensorDataType
impl Sync for TensorDataType
impl Unpin for TensorDataType
impl UnwindSafe for TensorDataType
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> 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