pub struct e3m2(/* private fields */);Expand description
A 6-bit floating point type with 3 exponent bits and 2 mantissa bits.
Implementations§
Trait Implementations§
Source§impl CubePrimitive for e3m2
impl CubePrimitive for e3m2
Source§fn as_type_native() -> Option<StorageType>
fn as_type_native() -> Option<StorageType>
Return the element type to use on GPU
fn from_const_value(_value: ConstantScalarValue) -> Self
Source§fn as_type(_scope: &Scope) -> StorageType
fn as_type(_scope: &Scope) -> StorageType
Return the element type to use on GPU.
Source§fn as_type_native_unchecked() -> StorageType
fn as_type_native_unchecked() -> StorageType
Native or static element type.
Source§fn size_bits_unchecked() -> usize
fn size_bits_unchecked() -> usize
Only native element types have a size.
fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType
fn into_lit_unchecked(self) -> Self
fn supported_uses<R: Runtime>(client: &ComputeClient<R>) -> EnumSet<TypeUsage>
fn type_size() -> u32
fn type_size_bits() -> u32
fn packing_factor() -> u32
fn __expand_type_size(scope: &Scope) -> u32
fn __expand_type_size_bits(scope: &Scope) -> u32
fn __expand_packing_factor(scope: &Scope) -> u32
Source§impl CubeType for e3m2
impl CubeType for e3m2
type ExpandType = ExpandElementTyped<e3m2>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
Source§impl<'de> Deserialize<'de> for e3m2
impl<'de> Deserialize<'de> for e3m2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<e3m2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<e3m2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ExpandElementIntoMut for e3m2
impl ExpandElementIntoMut for e3m2
fn elem_into_mut(scope: &mut Scope, elem: ExpandElement) -> ExpandElement
Source§impl IntoRuntime for e3m2
impl IntoRuntime for e3m2
fn __expand_runtime_method(self, scope: &mut Scope) -> ExpandElementTyped<Self>
fn runtime(self) -> Self
Source§impl PartialOrd for e3m2
impl PartialOrd for e3m2
Source§impl Serialize for e3m2
impl Serialize for e3m2
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 Copy for e3m2
impl Pod for e3m2
impl StructuralPartialEq for e3m2
Auto Trait Implementations§
impl Freeze for e3m2
impl RefUnwindSafe for e3m2
impl Send for e3m2
impl Sync for e3m2
impl Unpin for e3m2
impl UnwindSafe for e3m2
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<P> Cast for Pwhere
P: CubePrimitive,
impl<P> Cast for Pwhere
P: CubePrimitive,
fn cast_from<From>(_value: From) -> Pwhere
From: CubePrimitive,
fn __expand_cast_from<From: CubePrimitive>( scope: &mut Scope, value: ExpandElementTyped<From>, ) -> <Self as CubeType>::ExpandType
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<P> CubeDebug for Pwhere
P: CubePrimitive,
impl<P> CubeDebug for Pwhere
P: CubePrimitive,
Source§fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
Set the debug name of this type’s expansion. Should do nothing for types that don’t appear
at runtime
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<P> Reinterpret for Pwhere
P: CubePrimitive,
impl<P> Reinterpret for Pwhere
P: CubePrimitive,
Source§fn reinterpret<From: CubePrimitive>(value: From) -> Self
fn reinterpret<From: CubePrimitive>(value: From) -> Self
Reinterpret the bits of another primitive as this primitive without conversion.