#[non_exhaustive]pub enum ElementKind {
F32,
F16,
Bf16,
I8,
U8,
I16,
I32,
}Expand description
Scalar format of a native tensor.
ncnn records the element width but not whether a 16-bit element is IEEE half or bfloat16, so the caller supplies the format for those tensors.
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.
F32
IEEE 754 single precision.
F16
IEEE 754 half precision.
Bf16
Brain floating point, 16 bits.
I8
Signed 8-bit integer, the storage of a quantized tensor.
U8
Unsigned 8-bit integer.
I16
Signed 16-bit integer.
I32
Signed 32-bit integer.
Implementations§
Source§impl ElementKind
impl ElementKind
Trait Implementations§
Source§impl Clone for ElementKind
impl Clone for ElementKind
impl Copy for ElementKind
Source§impl Debug for ElementKind
impl Debug for ElementKind
impl Eq for ElementKind
Source§impl PartialEq for ElementKind
impl PartialEq for ElementKind
impl StructuralPartialEq for ElementKind
Auto Trait Implementations§
impl Freeze for ElementKind
impl RefUnwindSafe for ElementKind
impl Send for ElementKind
impl Sync for ElementKind
impl Unpin for ElementKind
impl UnsafeUnpin for ElementKind
impl UnwindSafe for ElementKind
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