CubePrimitive

Trait CubePrimitive 

Source
pub trait CubePrimitive:
    CubeType<ExpandType = ExpandElementTyped<Self>>
    + ExpandElementIntoMut
    + PartialEq
    + Send
    + Sync
    + 'static
    + Clone
    + Copy {
Show 16 methods // Required method fn from_const_value(value: ConstantScalarValue) -> Self; // Provided methods fn as_type(_scope: &Scope) -> StorageType { ... } fn as_type_native() -> Option<StorageType> { ... } fn as_type_native_unchecked() -> StorageType { ... } fn size() -> Option<usize> { ... } fn size_bits() -> Option<usize> { ... } fn size_bits_unchecked() -> usize { ... } fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType { ... } fn into_lit_unchecked(self) -> Self { ... } fn supported_uses<S: ComputeServer>( client: &ComputeClient<S>, ) -> EnumSet<TypeUsage> { ... } fn elem_size() -> u32 { ... } fn elem_size_bits() -> u32 { ... } fn packing_factor() -> u32 { ... } fn __expand_elem_size(scope: &Scope) -> u32 { ... } fn __expand_elem_size_bits(scope: &Scope) -> u32 { ... } fn __expand_packing_factor(scope: &Scope) -> u32 { ... }
}
Expand description

Form of CubeType that encapsulates all primitive types: Numeric, UInt, Bool

Required Methods§

Provided Methods§

Source

fn as_type(_scope: &Scope) -> StorageType

Return the element type to use on GPU.

Source

fn as_type_native() -> Option<StorageType>

Native or static element type.

Source

fn as_type_native_unchecked() -> StorageType

Native or static element type.

Source

fn size() -> Option<usize>

Only native element types have a size.

Source

fn size_bits() -> Option<usize>

Only native element types have a size.

Source

fn size_bits_unchecked() -> usize

Only native element types have a size.

Source

fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType

Source

fn into_lit_unchecked(self) -> Self

Source

fn supported_uses<S: ComputeServer>( client: &ComputeClient<S>, ) -> EnumSet<TypeUsage>

Source

fn elem_size() -> u32

Source

fn elem_size_bits() -> u32

Source

fn packing_factor() -> u32

Source

fn __expand_elem_size(scope: &Scope) -> u32

Source

fn __expand_elem_size_bits(scope: &Scope) -> u32

Source

fn __expand_packing_factor(scope: &Scope) -> u32

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CubePrimitive for bool

Source§

impl CubePrimitive for f32

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for f64

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for i8

Source§

impl CubePrimitive for i16

Source§

impl CubePrimitive for i32

Source§

impl CubePrimitive for i64

Source§

impl CubePrimitive for u8

Source§

impl CubePrimitive for u16

Source§

impl CubePrimitive for u32

Source§

impl CubePrimitive for u64

Source§

impl CubePrimitive for e2m1

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for e2m1x2

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for e2m3

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(_value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for e3m2

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(_value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for e4m3

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for e5m2

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for ue8m0

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for bf16

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Source§

impl CubePrimitive for f16

Source§

fn as_type_native() -> Option<StorageType>

Return the element type to use on GPU

Source§

fn from_const_value(value: ConstantScalarValue) -> Self

Implementors§