ChainedScope

Struct ChainedScope 

Source
pub struct ChainedScope<CS1: ChunkScope, CS2>
where CS2: ChunkScope<FromScope = CS1::ToScope> + ChunkScope,
{ /* private fields */ }

Trait Implementations§

Source§

impl<CS1: ChunkScope, CS2> ChunkScope for ChainedScope<CS1, CS2>
where CS2: ChunkScope<FromScope = CS1::ToScope> + ChunkScope,

Source§

type FromScope = <CS1 as ChunkScope>::FromScope

Source§

type ToScope = <CS2 as ChunkScope>::ToScope

Source§

fn thread_ids() -> [u32; 6]

Source§

fn global_dim<D: DimType>() -> u32

Source§

fn global_id<D: DimType>(thread_ids: [u32; 6]) -> u32

Source§

fn global_id_x(thread_ids: [u32; 6]) -> u32

Provided methods.
Source§

fn global_id_y(thread_ids: [u32; 6]) -> u32

Source§

fn global_id_z(thread_ids: [u32; 6]) -> u32

Source§

fn global_dim_x() -> u32

Source§

fn global_dim_y() -> u32

Source§

fn global_dim_z() -> u32

Source§

impl<CS1: Clone + ChunkScope, CS2> Clone for ChainedScope<CS1, CS2>
where CS2: ChunkScope<FromScope = CS1::ToScope> + Clone + ChunkScope,

Source§

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)

Performs copy-assignment from source. Read more
Source§

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

Source§

type IndexType = <Map2 as ScopeUniqueMap<CS2>>::IndexType

Source§

type GlobalIndexType = <Map1 as ScopeUniqueMap<CS1>>::GlobalIndexType

Source§

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.
Source§

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>
where CS1: Send, CS2: Send,

§

impl<CS1, CS2> Sync for ChainedScope<CS1, CS2>
where CS1: Sync, CS2: Sync,

§

impl<CS1, CS2> Unpin for ChainedScope<CS1, CS2>
where CS1: Unpin, CS2: Unpin,

§

impl<CS1, CS2> UnwindSafe for ChainedScope<CS1, CS2>
where CS1: UnwindSafe, CS2: 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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HostToDev<T> for T

Source§

fn convert(self) -> T

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> 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, 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.