pub enum ScalarType {
F32,
I64,
I32,
U8,
}
Expand description
Data type for a single number
Variants§
Implementations§
Source§impl ScalarType
impl ScalarType
pub fn from_i32(onnx: i32) -> Result<ScalarType, DataTypeError>
pub fn from(onnx: TensorProto_DataType) -> Result<ScalarType, DataTypeError>
pub fn to_datatype(&self) -> TensorProto_DataType
pub fn stride(&self) -> usize
pub fn wgsl_supported(&self) -> bool
pub fn wgsl_type_name(&self) -> &'static str
pub fn is_float(&self) -> bool
Trait Implementations§
Source§impl Clone for ScalarType
impl Clone for ScalarType
Source§fn clone(&self) -> ScalarType
fn clone(&self) -> ScalarType
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 ScalarType
impl Debug for ScalarType
Source§impl Display for ScalarType
impl Display for ScalarType
Source§impl PartialEq for ScalarType
impl PartialEq for ScalarType
impl Copy for ScalarType
impl Eq for ScalarType
impl StructuralPartialEq for ScalarType
Auto Trait Implementations§
impl Freeze for ScalarType
impl RefUnwindSafe for ScalarType
impl Send for ScalarType
impl Sync for ScalarType
impl Unpin for ScalarType
impl UnwindSafe for ScalarType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.