pub trait CubePrimitive:
CubeType<ExpandType = ExpandElementTyped<Self>>
+ ExpandElementBaseInit
+ PartialEq
+ Send
+ Sync
+ 'static
+ Clone
+ Copy {
// Provided methods
fn as_elem(_context: &Scope) -> Elem { ... }
fn as_elem_native() -> Option<Elem> { ... }
fn as_elem_native_unchecked() -> Elem { ... }
fn size() -> Option<usize> { ... }
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 __expand_elem_size(context: &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.
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 __expand_elem_size(context: &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 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