Skip to main content

Elem

Enum Elem 

Source
pub enum Elem<D: Dialect> {
Show 25 variants TF32, F32, F64, F16, F16x2, BF16, BF16x2, FP4(FP4Kind), FP4x2(FP4Kind), FP6(FP6Kind), FP6x2(FP6Kind), FP8(FP8Kind), FP8x2(FP8Kind), I8, I16, I32, I64, U8, U16, U32, U64, Bool, Barrier(BarrierLevel), Atomic(AtomicKind<D>), _Dialect(PhantomData<D>),
}

Variants§

§

TF32

§

F32

§

F64

§

F16

§

F16x2

§

BF16

§

BF16x2

§

FP4(FP4Kind)

§

FP4x2(FP4Kind)

§

FP6(FP6Kind)

§

FP6x2(FP6Kind)

§

FP8(FP8Kind)

§

FP8x2(FP8Kind)

§

I8

§

I16

§

I32

§

I64

§

U8

§

U16

§

U32

§

U64

§

Bool

§

Barrier(BarrierLevel)

§

Atomic(AtomicKind<D>)

§

_Dialect(PhantomData<D>)

Implementations§

Source§

impl<D: Dialect> Elem<D>

Source

pub const fn size(&self) -> usize

Source

pub const fn size_bits(&self) -> usize

Source

pub const fn unpacked(&self) -> Self

Source

pub const fn packing_factor(&self) -> usize

Get the number of values packed into a single storage element. (i.e. f16x2 -> 2)

Source

pub const fn ident(&self) -> &str

Trait Implementations§

Source§

impl<D: Clone + Dialect> Clone for Elem<D>

Source§

fn clone(&self) -> Elem<D>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Debug + Dialect> Debug for Elem<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: Dialect> Display for Elem<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: Hash + Dialect> Hash for Elem<D>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<D: PartialEq + Dialect> PartialEq for Elem<D>

Source§

fn eq(&self, other: &Elem<D>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<D: Copy + Dialect> Copy for Elem<D>

Source§

impl<D: Eq + Dialect> Eq for Elem<D>

Source§

impl<D: Dialect> StructuralPartialEq for Elem<D>

Auto Trait Implementations§

§

impl<D> Freeze for Elem<D>

§

impl<D> RefUnwindSafe for Elem<D>
where D: RefUnwindSafe,

§

impl<D> Send for Elem<D>

§

impl<D> Sync for Elem<D>

§

impl<D> Unpin for Elem<D>
where D: Unpin,

§

impl<D> UnsafeUnpin for Elem<D>

§

impl<D> UnwindSafe for Elem<D>
where D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<C> CloneExpand for C
where C: Clone,

Source§

fn __expand_clone_method(&self, _scope: &mut Scope) -> C

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CompilationArg for T
where T: Clone + PartialEq + Eq + Hash + Debug + Send + Sync + 'static,

Source§

fn dynamic_cast<Arg>(&self) -> Arg
where Arg: CompilationArg,

Compilation args should be the same even with different element types. However, it isn’t possible to enforce it with the type system. So, we make the compilation args serializable and dynamically cast them. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> CubeComptime for T
where T: Debug + Hash + Eq + Clone + Copy,