ChainedMap

Struct ChainedMap 

Source
pub struct ChainedMap<CS1: ChunkScope, CS2: ChunkScope, Map1: ScopeUniqueMap<CS1>, Map2: ScopeUniqueMap<CS2>> { /* private fields */ }

Implementations§

Source§

impl<CS1: ChunkScope, CS2, Map1: ScopeUniqueMap<CS1>, Map2: ScopeUniqueMap<CS2>> ChainedMap<CS1, CS2, Map1, Map2>
where CS2: ChunkScope<FromScope = CS1::ToScope> + ChunkScope,

Source

pub fn new(m1: Map1, m2: Map2) -> Self

Trait Implementations§

Source§

impl<CS1: Clone + ChunkScope, CS2: Clone + ChunkScope, Map1: Clone + ScopeUniqueMap<CS1>, Map2: Clone + ScopeUniqueMap<CS2>> Clone for ChainedMap<CS1, CS2, Map1, Map2>

Source§

fn clone(&self) -> ChainedMap<CS1, CS2, Map1, Map2>

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

Source§

impl<CS1: Copy + ChunkScope, CS2: Copy + ChunkScope, Map1: Copy + ScopeUniqueMap<CS1>, Map2: Copy + ScopeUniqueMap<CS2>> Copy for ChainedMap<CS1, CS2, Map1, Map2>

Auto Trait Implementations§

§

impl<CS1, CS2, Map1, Map2> Freeze for ChainedMap<CS1, CS2, Map1, Map2>
where Map1: Freeze, Map2: Freeze,

§

impl<CS1, CS2, Map1, Map2> RefUnwindSafe for ChainedMap<CS1, CS2, Map1, Map2>
where Map1: RefUnwindSafe, Map2: RefUnwindSafe, CS1: RefUnwindSafe, CS2: RefUnwindSafe,

§

impl<CS1, CS2, Map1, Map2> Send for ChainedMap<CS1, CS2, Map1, Map2>
where Map1: Send, Map2: Send, CS1: Send, CS2: Send,

§

impl<CS1, CS2, Map1, Map2> Sync for ChainedMap<CS1, CS2, Map1, Map2>
where Map1: Sync, Map2: Sync, CS1: Sync, CS2: Sync,

§

impl<CS1, CS2, Map1, Map2> Unpin for ChainedMap<CS1, CS2, Map1, Map2>
where Map1: Unpin, Map2: Unpin, CS1: Unpin, CS2: Unpin,

§

impl<CS1, CS2, Map1, Map2> UnwindSafe for ChainedMap<CS1, CS2, Map1, Map2>
where Map1: UnwindSafe, Map2: UnwindSafe, 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.