Skip to main content

RudaPrimitive

Trait RudaPrimitive 

Source
pub trait RudaPrimitive:
    RudaType<ExpandType = NativeExpand<Self>>
    + NativeAssign
    + PartialEq
    + Send
    + Sync
    + 'static
    + Clone
    + Copy {
    type Scalar: Scalar;
    type Size: Size;
    type WithScalar<S: Scalar>: RudaPrimitive;

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 RudaType that encapsulates all primitive types: Numeric, UInt, Bool

Required Associated Types§

Required Methods§

Provided Methods§

Source

fn as_type(_scope: &Scope) -> Type

Return the element type to use on GPU.

Source

fn as_type_native() -> Option<Type>

Native or static element type.

Source

fn as_type_native_unchecked() -> Type

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: ManagedVariable) -> Self::ExpandType

Source

fn into_lit_unchecked(self) -> Self

Source

fn supported_uses<R: Runtime>(client: &ComputeClient<R>) -> EnumSet<TypeUsage>

Source

fn type_size() -> usize

Source

fn type_size_bits() -> usize

Source

fn packing_factor() -> usize

Source

fn vector_size() -> usize

Source

fn __expand_type_size(scope: &Scope) -> usize

Source

fn __expand_type_size_bits(scope: &Scope) -> usize

Source

fn __expand_packing_factor(scope: &Scope) -> usize

Source

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".

Implementations on Foreign Types§

Source§

impl RudaPrimitive for bf16

Source§

fn as_type_native() -> Option<Type>

Return the element type to use on GPU

Source§

type Scalar = bf16

Source§

type Size = Const<1>

Source§

type WithScalar<S: Scalar> = S

Source§

fn from_const_value(value: ConstantValue) -> Self

Source§

impl RudaPrimitive for bool

Source§

impl RudaPrimitive for f16

Source§

fn as_type_native() -> Option<Type>

Return the element type to use on GPU

Source§

type Scalar = f16

Source§

type Size = Const<1>

Source§

type WithScalar<S: Scalar> = S

Source§

fn from_const_value(value: ConstantValue) -> Self

Source§

impl RudaPrimitive for f32

Source§

fn as_type_native() -> Option<Type>

Return the element type to use on GPU

Source§

type Scalar = f32

Source§

type Size = Const<1>

Source§

type WithScalar<S: Scalar> = S

Source§

fn from_const_value(value: ConstantValue) -> Self

Source§

impl RudaPrimitive for f64

Source§

fn as_type_native() -> Option<Type>

Return the element type to use on GPU

Source§

type Scalar = f64

Source§

type Size = Const<1>

Source§

type WithScalar<S: Scalar> = S

Source§

fn from_const_value(value: ConstantValue) -> Self

Source§

impl RudaPrimitive for i8

Source§

impl RudaPrimitive for i16

Source§

impl RudaPrimitive for i32

Source§

impl RudaPrimitive for i64

Source§

impl RudaPrimitive for isize

Source§

impl RudaPrimitive for u8

Source§

impl RudaPrimitive for u16

Source§

impl RudaPrimitive for u32

Source§

impl RudaPrimitive for u64

Source§

impl RudaPrimitive for usize

Implementors§

Source§

impl RudaPrimitive for Barrier

Source§

impl RudaPrimitive for e2m1

Source§

impl RudaPrimitive for e2m3

Source§

impl RudaPrimitive for e2m1x2

Source§

impl RudaPrimitive for e3m2

Source§

impl RudaPrimitive for e4m3

Source§

impl RudaPrimitive for e5m2

Source§

impl RudaPrimitive for flex32

Source§

impl RudaPrimitive for tf32

Source§

impl RudaPrimitive for ue8m0

Source§

impl<Inner: RudaPrimitive> RudaPrimitive for Atomic<Inner>

Source§

impl<Marker: 'static> RudaPrimitive for DynamicScalar<Marker>

Source§

impl<P: Scalar, N: Size> RudaPrimitive for Vector<P, N>