pub struct ChainedScope<CS1: ChunkScope, CS2>{ /* private fields */ }Trait Implementations§
Source§impl<CS1: ChunkScope, CS2> ChunkScope for ChainedScope<CS1, CS2>
impl<CS1: ChunkScope, CS2> ChunkScope for ChainedScope<CS1, CS2>
type FromScope = <CS1 as ChunkScope>::FromScope
type ToScope = <CS2 as ChunkScope>::ToScope
fn thread_ids() -> [u32; 6]
fn global_dim<D: DimType>() -> u32
fn global_id<D: DimType>(thread_ids: [u32; 6]) -> u32
fn global_id_y(thread_ids: [u32; 6]) -> u32
fn global_id_z(thread_ids: [u32; 6]) -> u32
fn global_dim_x() -> u32
fn global_dim_y() -> u32
fn global_dim_z() -> u32
Source§impl<CS1: Clone + ChunkScope, CS2> Clone for ChainedScope<CS1, CS2>
impl<CS1: Clone + ChunkScope, CS2> Clone for ChainedScope<CS1, CS2>
Source§fn clone(&self) -> ChainedScope<CS1, CS2>
fn clone(&self) -> ChainedScope<CS1, CS2>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<CS1: ChunkScope, CS2, Map1, Map2> ScopeUniqueMap<ChainedScope<CS1, CS2>> for ChainedMap<CS1, CS2, Map1, Map2>where
CS2: ChunkScope<FromScope = CS1::ToScope> + ChunkScope,
Map1: ScopeUniqueMap<CS1>,
Map2: ScopeUniqueMap<CS2>,
Map2::GlobalIndexType: AsPrimitive<Map1::IndexType>,
Chain two mapping strategies.
For example,
block_size = (32 * 4, 1, 1),
MapLinear(64) + MapLinear(2) = MapLinear
idx -> map2(idx) -> map1(map2(idx))
0 -> 0 -> 0
1 -> 1 -> 1
2 -> 64 -> 4 * 64
3 -> 65 -> 4 * 64 + 1
impl<CS1: ChunkScope, CS2, Map1, Map2> ScopeUniqueMap<ChainedScope<CS1, CS2>> for ChainedMap<CS1, CS2, Map1, Map2>where
CS2: ChunkScope<FromScope = CS1::ToScope> + ChunkScope,
Map1: ScopeUniqueMap<CS1>,
Map2: ScopeUniqueMap<CS2>,
Map2::GlobalIndexType: AsPrimitive<Map1::IndexType>,
Chain two mapping strategies.
For example,
block_size = (32 * 4, 1, 1),
MapLinear
type IndexType = <Map2 as ScopeUniqueMap<CS2>>::IndexType
type GlobalIndexType = <Map1 as ScopeUniqueMap<CS1>>::GlobalIndexType
Source§fn map(
&self,
idx: Self::IndexType,
thread_ids: [u32; 6],
) -> (bool, Self::GlobalIndexType)
fn map( &self, idx: Self::IndexType, thread_ids: [u32; 6], ) -> (bool, Self::GlobalIndexType)
Returns the extra precondition of indexing operation and the global
index. Without providing extra precondition, index will always check the
OOB error with global idx.
fn precondition(&self) -> bool
Auto Trait Implementations§
impl<CS1, CS2> Freeze for ChainedScope<CS1, CS2>
impl<CS1, CS2> RefUnwindSafe for ChainedScope<CS1, CS2>where
CS1: RefUnwindSafe,
CS2: RefUnwindSafe,
impl<CS1, CS2> Send for ChainedScope<CS1, CS2>
impl<CS1, CS2> Sync for ChainedScope<CS1, CS2>
impl<CS1, CS2> Unpin for ChainedScope<CS1, CS2>
impl<CS1, CS2> UnwindSafe for ChainedScope<CS1, CS2>where
CS1: UnwindSafe,
CS2: 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