pub trait CubePrimitive:
CubeType<ExpandType = NativeExpand<Self>>
+ NativeAssign
+ PartialEq
+ Send
+ Sync
+ 'static
+ Clone
+ Copy {
type Scalar: Scalar;
type Size: Size;
type WithScalar<S: Scalar>: CubePrimitive;
Show 18 methods
// Required method
fn from_const_value(value: ConstantValue) -> Self;
// Provided methods
fn as_type(_scope: &Scope) -> Type { ... }
fn as_type_native() -> Option<Type> { ... }
fn as_type_native_unchecked() -> Type { ... }
fn size() -> Option<usize> { ... }
fn size_bits() -> Option<usize> { ... }
fn size_bits_unchecked() -> usize { ... }
fn from_expand_elem(elem: ManagedVariable) -> Self::ExpandType { ... }
fn into_lit_unchecked(self) -> Self { ... }
fn supported_uses<R: Runtime>(
client: &ComputeClient<R>,
) -> EnumSet<TypeUsage> { ... }
fn type_size() -> usize { ... }
fn type_size_bits() -> usize { ... }
fn packing_factor() -> usize { ... }
fn vector_size() -> usize { ... }
fn __expand_type_size(scope: &Scope) -> usize { ... }
fn __expand_type_size_bits(scope: &Scope) -> usize { ... }
fn __expand_packing_factor(scope: &Scope) -> usize { ... }
fn __expand_vector_size(scope: &Scope) -> usize { ... }
}Expand description
Form of CubeType that encapsulates all primitive types:
Numeric, UInt, Bool
Required Associated Types§
Required Methods§
fn from_const_value(value: ConstantValue) -> Self
Provided Methods§
Sourcefn as_type_native() -> Option<Type>
fn as_type_native() -> Option<Type>
Native or static element type.
Sourcefn as_type_native_unchecked() -> Type
fn as_type_native_unchecked() -> Type
Native or static element type.
Sourcefn size_bits_unchecked() -> usize
fn size_bits_unchecked() -> usize
Only native element types have a size.
fn from_expand_elem(elem: ManagedVariable) -> Self::ExpandType
fn into_lit_unchecked(self) -> Self
fn supported_uses<R: Runtime>(client: &ComputeClient<R>) -> EnumSet<TypeUsage>
fn type_size() -> usize
fn type_size_bits() -> usize
fn packing_factor() -> usize
fn vector_size() -> usize
fn __expand_type_size(scope: &Scope) -> usize
fn __expand_type_size_bits(scope: &Scope) -> usize
fn __expand_packing_factor(scope: &Scope) -> usize
fn __expand_vector_size(scope: &Scope) -> usize
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.