#[non_exhaustive]#[repr(u8)]pub enum KernelDType {
F32 = 1,
F64 = 2,
I32 = 3,
I64 = 4,
Bool = 5,
C32 = 6,
C64 = 7,
}Expand description
Dtypes supported by dtype-erased kernel entry points.
The enum is intentionally limited to the scalar set currently used by the tensor runtime callers. Later FFI layers should map their ABI dtype tags to this enum before dispatching into prepared kernels.
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.
Implementations§
Trait Implementations§
Source§impl Clone for KernelDType
impl Clone for KernelDType
Source§fn clone(&self) -> KernelDType
fn clone(&self) -> KernelDType
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 KernelDType
Source§impl Debug for KernelDType
impl Debug for KernelDType
impl Eq for KernelDType
Source§impl Hash for KernelDType
impl Hash for KernelDType
Source§impl PartialEq for KernelDType
impl PartialEq for KernelDType
impl StructuralPartialEq for KernelDType
Auto Trait Implementations§
impl Freeze for KernelDType
impl RefUnwindSafe for KernelDType
impl Send for KernelDType
impl Sync for KernelDType
impl Unpin for KernelDType
impl UnsafeUnpin for KernelDType
impl UnwindSafe for KernelDType
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