pub trait CubePrimitive:
CubeType<ExpandType = ExpandElementTyped<Self>>
+ ExpandElementIntoMut
+ PartialEq
+ Send
+ Sync
+ 'static
+ Clone
+ Copy {
// Provided methods
fn as_elem(_scope: &Scope) -> Elem { ... }
fn as_elem_native() -> Option<Elem> { ... }
fn as_elem_native_unchecked() -> Elem { ... }
fn size() -> Option<usize> { ... }
fn size_bits() -> Option<usize> { ... }
fn min_line_size(&self) -> Option<u8> { ... }
fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType { ... }
fn is_supported<S: ComputeServer<Feature = Feature>, C: ComputeChannel<S>>(
client: &ComputeClient<S, C>,
) -> bool { ... }
fn elem_size() -> u32 { ... }
fn elem_size_bits() -> u32 { ... }
fn __expand_elem_size(scope: &Scope) -> u32 { ... }
fn __expand_elem_size_bits(scope: &Scope) -> u32 { ... }
}
Expand description
Form of CubeType that encapsulates all primitive types: Numeric, UInt, Bool
Provided Methods§
Sourcefn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Native or static element type.
Sourcefn as_elem_native_unchecked() -> Elem
fn as_elem_native_unchecked() -> Elem
Native or static element type.
Sourcefn min_line_size(&self) -> Option<u8>
fn min_line_size(&self) -> Option<u8>
Minimum line size of this type
fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType
fn is_supported<S: ComputeServer<Feature = Feature>, C: ComputeChannel<S>>( client: &ComputeClient<S, C>, ) -> bool
fn elem_size() -> u32
fn elem_size_bits() -> u32
fn __expand_elem_size(scope: &Scope) -> u32
fn __expand_elem_size_bits(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
impl CubePrimitive for bool
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for f32
impl CubePrimitive for f32
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for f64
impl CubePrimitive for f64
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for i8
impl CubePrimitive for i8
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for i16
impl CubePrimitive for i16
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for i32
impl CubePrimitive for i32
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for i64
impl CubePrimitive for i64
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for u8
impl CubePrimitive for u8
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for u16
impl CubePrimitive for u16
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for u32
impl CubePrimitive for u32
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for u64
impl CubePrimitive for u64
fn as_elem_native() -> Option<Elem>
Source§impl CubePrimitive for e2m1
impl CubePrimitive for e2m1
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for e2m3
impl CubePrimitive for e2m3
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for e3m2
impl CubePrimitive for e3m2
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for e4m3
impl CubePrimitive for e4m3
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for e5m2
impl CubePrimitive for e5m2
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for ue8m0
impl CubePrimitive for ue8m0
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for bf16
impl CubePrimitive for bf16
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU
Source§impl CubePrimitive for f16
impl CubePrimitive for f16
Source§fn as_elem_native() -> Option<Elem>
fn as_elem_native() -> Option<Elem>
Return the element type to use on GPU