pub enum DType {
F32,
F64,
I32,
I64,
Bool,
C32,
C64,
External(TypeId),
}Expand description
Runtime scalar dtype tag.
§Examples
use tenferro_tensor_core::DType;
assert_eq!(DType::F64, DType::F64);Variants§
F32
32-bit floating point.
F64
64-bit floating point.
I32
32-bit signed integer.
I64
64-bit signed integer.
Bool
Boolean.
C32
32-bit complex floating point.
C64
64-bit complex floating point.
External(TypeId)
Implementations§
Source§impl DType
impl DType
Sourcepub const SPECS: &'static [MemberSpec]
pub const SPECS: &'static [MemberSpec]
Promotion facts of every member, in declaration order.
Sourcepub const fn spec(self) -> MemberSpec
pub const fn spec(self) -> MemberSpec
Promotion facts of this member.
§Examples
use tenferro_tensor_core::{MemberKind, DType};
assert_eq!(DType::F64.spec().kind, MemberKind::Float);Trait Implementations§
impl Copy for DType
impl Eq for DType
impl StructuralPartialEq for DType
Auto Trait Implementations§
impl Freeze for DType
impl RefUnwindSafe for DType
impl Send for DType
impl Sync for DType
impl Unpin for DType
impl UnsafeUnpin for DType
impl UnwindSafe for DType
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more