pub enum RoleRule {
MainFlowOnly,
LoadOnlyFirst(Threshold),
LoadOnlyLast(Threshold),
}
Expand description
Rule to distinguish a plane’s role based on its plane id
Variants§
MainFlowOnly
All planes are in the main flow, this is equivalent of having no specialization
LoadOnlyFirst(Threshold)
Load-only planes: [0, Threshold) Main flow planes: [Threshold, total)
LoadOnlyLast(Threshold)
Main flow planes: [0, Threshold) Load-only planes: [Threshold, total)
Implementations§
Source§impl RoleRule
impl RoleRule
pub fn new_MainFlowOnly() -> Self
pub fn __expand_new_MainFlowOnly(_: &mut Scope) -> RoleRuleExpand
pub fn new_LoadOnlyFirst(_0: Threshold) -> Self
pub fn __expand_new_LoadOnlyFirst( _: &mut Scope, _0: <Threshold as CubeType>::ExpandType, ) -> RoleRuleExpand
pub fn new_LoadOnlyLast(_0: Threshold) -> Self
pub fn __expand_new_LoadOnlyLast( _: &mut Scope, _0: <Threshold as CubeType>::ExpandType, ) -> RoleRuleExpand
Source§impl RoleRule
impl RoleRule
Sourcepub fn new(comptime_rule: RoleRuleConfig) -> RoleRule
pub fn new(comptime_rule: RoleRuleConfig) -> RoleRule
Make a cube role rule from comptime config
Sourcepub fn is_load_only(self) -> bool
pub fn is_load_only(self) -> bool
Whether the current plane is a load-only plane
Sourcepub fn compute_index(self) -> u32
pub fn compute_index(self) -> u32
The index of the current plane among planes that perform compute, ignoring load-only planes
Sourcepub fn load_index(
self,
ident: InputIdent,
specialized_loading_sides: SpecializedLoadingSides,
) -> u32
pub fn load_index( self, ident: InputIdent, specialized_loading_sides: SpecializedLoadingSides, ) -> u32
The index of the current plane among planes that perform loading,
ignoring any plane that does not participate for this ident
.
pub fn __expand_new( scope: &mut Scope, comptime_rule: RoleRuleConfig, ) -> <RoleRule as CubeType>::ExpandType
pub fn __expand_is_load_only( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
pub fn __expand_compute_index( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
pub fn __expand_load_index( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ident: InputIdent, specialized_loading_sides: SpecializedLoadingSides, ) -> <u32 as CubeType>::ExpandType
Trait Implementations§
Source§impl CubeDebug for RoleRule
impl CubeDebug for RoleRule
Source§fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
fn set_debug_name(&self, scope: &mut Scope, name: &'static str)
Set the debug name of this type’s expansion. Should do nothing for types that don’t appear
at runtime
Source§impl CubeType for RoleRule
impl CubeType for RoleRule
type ExpandType = RoleRuleExpand
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
impl Copy for RoleRule
impl Eq for RoleRule
impl StructuralPartialEq for RoleRule
Auto Trait Implementations§
impl Freeze for RoleRule
impl RefUnwindSafe for RoleRule
impl Send for RoleRule
impl Sync for RoleRule
impl Unpin for RoleRule
impl UnwindSafe for RoleRule
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.