pub struct Item<D: Dialect> { /* private fields */ }Implementations§
Source§impl<D: Dialect> Item<D>
impl<D: Dialect> Item<D>
pub fn elem(&self) -> &Elem<D>
pub const fn size(&self) -> usize
pub fn new(elem: Elem<D>, vectorization: usize, native: bool) -> Self
pub fn scalar(elem: Elem<D>, native: bool) -> Self
pub fn can_be_optimized(&self) -> bool
pub fn is_optimized(&self) -> bool
pub fn is_atomic(&self) -> bool
pub fn optimized(&self) -> Item<D>
Sourcepub fn packing_factor(&self) -> usize
pub fn packing_factor(&self) -> usize
Get the number of values packed into a single storage element. (i.e. f16x2 -> 2)
pub fn de_optimized(&self) -> Self
Trait Implementations§
impl<D: Copy + Dialect> Copy for Item<D>
impl<D: Eq + Dialect> Eq for Item<D>
impl<D: Dialect> StructuralPartialEq for Item<D>
Auto Trait Implementations§
impl<D> Freeze for Item<D>
impl<D> RefUnwindSafe for Item<D>where
D: RefUnwindSafe,
impl<D> Send for Item<D>
impl<D> Sync for Item<D>
impl<D> Unpin for Item<D>where
D: Unpin,
impl<D> UnsafeUnpin for Item<D>
impl<D> UnwindSafe for Item<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompilationArg for T
impl<T> CompilationArg for T
Source§fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
fn dynamic_cast<Arg>(&self) -> Argwhere
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
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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