pub enum NdTensorDType {
F64,
F32,
U8,
I32,
Bool,
}Expand description
Element dtype of an N-D tensor. The C ABI exposes a matching #[repr(C)]
DagMlDataTensorDType enum and maps to/from this type explicitly; this core
enum carries no ABI guarantee of its own.
Variants§
Implementations§
Source§impl NdTensorDType
impl NdTensorDType
Sourcepub fn element_size(self) -> usize
pub fn element_size(self) -> usize
Size in bytes of one element of this dtype.
Trait Implementations§
Source§impl Clone for NdTensorDType
impl Clone for NdTensorDType
Source§fn clone(&self) -> NdTensorDType
fn clone(&self) -> NdTensorDType
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 NdTensorDType
Source§impl Debug for NdTensorDType
impl Debug for NdTensorDType
Source§impl<'de> Deserialize<'de> for NdTensorDType
impl<'de> Deserialize<'de> for NdTensorDType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NdTensorDType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NdTensorDType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NdTensorDType
Source§impl PartialEq for NdTensorDType
impl PartialEq for NdTensorDType
Source§fn eq(&self, other: &NdTensorDType) -> bool
fn eq(&self, other: &NdTensorDType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NdTensorDType
impl Serialize for NdTensorDType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for NdTensorDType
Auto Trait Implementations§
impl Freeze for NdTensorDType
impl RefUnwindSafe for NdTensorDType
impl Send for NdTensorDType
impl Sync for NdTensorDType
impl Unpin for NdTensorDType
impl UnsafeUnpin for NdTensorDType
impl UnwindSafe for NdTensorDType
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