pub enum MaskLayout {
Unit(UnitTileLayout),
WhiteboxFragment(WhiteboxFragmentLayout),
}Expand description
Layout of an attention-style mask fragment across the units of a plane. Purely comptime — all variants carry only comptime data.
Variants§
Unit(UnitTileLayout)
Each unit owns a full row-major copy of the tile.
WhiteboxFragment(WhiteboxFragmentLayout)
The tile is fragmented across plane units, with the layout described by
WhiteboxFragmentLayout.
Implementations§
Source§impl MaskLayout
impl MaskLayout
pub const fn unit(num_rows: u32, num_cols: u32) -> MaskLayout
pub const fn whitebox_fragment( tile_shape: Coords2d, plane_dim: u32, inner_layout: InnerLayout, ) -> MaskLayout
Trait Implementations§
Source§impl Clone for MaskLayout
impl Clone for MaskLayout
Source§fn clone(&self) -> MaskLayout
fn clone(&self) -> MaskLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MaskLayout
impl Debug for MaskLayout
Source§impl Hash for MaskLayout
impl Hash for MaskLayout
Source§impl PartialEq for MaskLayout
impl PartialEq for MaskLayout
Source§fn eq(&self, other: &MaskLayout) -> bool
fn eq(&self, other: &MaskLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MaskLayout
impl Eq for MaskLayout
impl StructuralPartialEq for MaskLayout
Auto Trait Implementations§
impl Freeze for MaskLayout
impl RefUnwindSafe for MaskLayout
impl Send for MaskLayout
impl Sync for MaskLayout
impl Unpin for MaskLayout
impl UnsafeUnpin for MaskLayout
impl UnwindSafe for MaskLayout
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.