Skip to main content

ReadOnlyLocalChunks

Struct ReadOnlyLocalChunks 

Source
pub struct ReadOnlyLocalChunks<T: Dist> { /* private fields */ }
Expand description

An iterator over immutable (nonoverlapping) local chunks (of size chunk_size) of an ReadOnlyArray This struct is created by calling ReadOnlyArray::local_chunks

Trait Implementations§

Source§

impl<T: Clone + Dist> Clone for ReadOnlyLocalChunks<T>

Source§

fn clone(&self) -> ReadOnlyLocalChunks<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Dist + 'static> IndexedLocalIterator for ReadOnlyLocalChunks<T>

Source§

fn iterator_index(&self, index: usize) -> Option<usize>

given an local index return the corresponding local iterator index ( or None otherwise)
Source§

fn enumerate(self) -> Enumerate<Self>

yields the local (to the calling PE) index along with each element Read more
Source§

fn chunks(self, size: usize) -> Chunks<Self>

Split an iterator into fixed-sized chunks Read more
Source§

fn skip(self, count: usize) -> Skip<Self>

An iterator that skips the first n elements Read more
Source§

fn step_by(self, step_size: usize) -> StepBy<Self>

An iterator that steps by step_size elements Read more
Source§

fn take(self, count: usize) -> Take<Self>

An iterator that takes the first n elements Read more
Source§

fn zip<I: IndexedLocalIterator>(self, iter: I) -> Zip<Self, I>

Iterates over tuples (A,B) where the A items are from this iterator and the B items are from the iter in the argument. If the two iterators are of unequal length, the returned iterator will be equal in length to the shorter of the two. Read more
Source§

impl<T: Dist + 'static> LocalIterator for ReadOnlyLocalChunks<T>

Source§

type Item = &'static [T]

The type of item this local iterator produces
Source§

type Array = ReadOnlyArray<T>

The array to which this local iterator was created from
Source§

fn array(&self) -> Self::Array

Return the original array this local iterator belongs too
Source§

fn next(&mut self) -> Option<Self::Item>

Return the next element in the iterator, otherwise return None
Source§

fn elems(&self, in_elems: usize) -> usize

Return the maximum number of elements in the iterator Read more
Source§

fn advance_index(&mut self, count: usize)

advance the internal iterator localtion by count elements
Source§

fn filter<F>(self, op: F) -> Filter<Self, F>
where F: Fn(&Self::Item) -> bool + Clone + 'static,

Applies op on each element of this iterator, producing a new iterator with only the elements that gave true results Read more
Source§

fn filter_map<F, R>(self, op: F) -> FilterMap<Self, F>
where F: Fn(Self::Item) -> Option<R> + Clone + 'static, R: Send + 'static,

Applies op on each element of this iterator to get an Option, producing a new iterator with only the elements that return Some Read more
Source§

fn map<F, R>(self, op: F) -> Map<Self, F>
where F: Fn(Self::Item) -> R + Clone + 'static, R: Send + 'static,

Applies op to each element producing a new iterator with the results Read more
Source§

fn monotonic(self) -> Monotonic<Self>

Similar to the Enumerate iterator (which can only be applied to IndexedLocalIterators), but the yielded indicies are only guaranteed to be unique and monotonically increasing, they should not be considered to have any relation to the underlying location of data in the local array. Read more
Source§

fn for_each<F>(&self, op: F) -> LocalIterForEachHandle
where F: Fn(Self::Item) + SyncSend + Clone + 'static,

Calls a closure on each element of a Local Iterator in parallel on the calling PE (the PE must have some local data of the array). Read more
Source§

fn for_each_with_schedule<F>( &self, sched: Schedule, op: F, ) -> LocalIterForEachHandle
where F: Fn(Self::Item) + SyncSend + Clone + 'static,

Calls a closure on each element of a Local Iterator in parallel on the calling PE (the PE must have some local data of the array) using the specififed Scehedule policy. Read more
Source§

fn for_each_async<F, Fut>(&self, op: F) -> LocalIterForEachHandle
where F: Fn(Self::Item) -> Fut + SyncSend + Clone + 'static, Fut: Future<Output = ()> + Send + 'static,

Calls a closure and immediately awaits the result on each element of a Local Iterator in parallel on the calling PE (the PE must have some local data of the array). Read more
Source§

fn for_each_async_with_schedule<F, Fut>( &self, sched: Schedule, op: F, ) -> LocalIterForEachHandle
where F: Fn(Self::Item) -> Fut + SyncSend + Clone + 'static, Fut: Future<Output = ()> + Send + 'static,

Calls a closure on each element of a Local Iterator in parallel on the calling PE (the PE must have some local data of the array) using the specififed Schedule policy. Read more
Source§

fn reduce<F>(&self, op: F) -> LocalIterReduceHandle<Self::Item, F>
where Self::Item: SyncSend + Copy, F: Fn(Self::Item, Self::Item) -> Self::Item + SyncSend + Clone + 'static,

Reduces the elements of the local iterator using the provided closure Read more
Source§

fn reduce_with_schedule<F>( &self, sched: Schedule, op: F, ) -> LocalIterReduceHandle<Self::Item, F>
where Self::Item: SyncSend + Copy, F: Fn(Self::Item, Self::Item) -> Self::Item + SyncSend + Clone + 'static,

Reduces the elements of the local iterator using the provided closure and specififed Schedule policy Read more
Source§

fn collect_async<A, T>(&self, d: Distribution) -> LocalIterCollectHandle<T, A>
where T: Dist + ArrayOps, Self::Item: Future<Output = T> + Send + 'static, A: AsyncTeamFrom<(Vec<T>, Distribution)> + SyncSend + Clone + 'static,

Collects the awaited elements of the local iterator into a new LamellarArray Read more
Source§

fn collect_async_with_schedule<A, T>( &self, sched: Schedule, d: Distribution, ) -> LocalIterCollectHandle<T, A>
where T: Dist + ArrayOps, Self::Item: Future<Output = T> + Send + 'static, A: AsyncTeamFrom<(Vec<T>, Distribution)> + SyncSend + Clone + 'static,

Collects the awaited elements of the local iterator into a new LamellarArray, using the provided Schedule policy Read more
Source§

fn count(&self) -> LocalIterCountHandle

Counts the number of the elements of the local iterator Read more
Source§

fn count_with_schedule(&self, sched: Schedule) -> LocalIterCountHandle

Counts the number of the elements of the local iterator using the provided Schedule policy Read more
Source§

fn sum(&self) -> LocalIterSumHandle<Self::Item>
where Self::Item: SyncSend + for<'a> Sum<&'a Self::Item> + Sum<Self::Item>,

Sums the elements of the local iterator. Read more
Source§

fn sum_with_schedule(&self, sched: Schedule) -> LocalIterSumHandle<Self::Item>
where Self::Item: SyncSend + for<'a> Sum<&'a Self::Item> + Sum<Self::Item>,

Sums the elements of the local iterator, using the specified Schedule policy Read more

Auto Trait Implementations§

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, U> AsyncTeamInto<U> for T
where T: Send, U: AsyncTeamFrom<T>,

Source§

fn team_into<'life0, 'async_trait>( self, team: &'life0 Arc<LamellarTeam>, ) -> Pin<Box<dyn Future<Output = U> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

converts this type into the (usually inferred) input type
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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, 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> SyncSend for T
where T: Sync + Send,

Source§

impl<T, U> TeamInto<U> for T
where U: TeamFrom<T>,

Source§

fn team_into(self, team: &Arc<LamellarTeam>) -> U

converts this type into the (usually inferred) input type
Source§

impl<T, U> TeamTryInto<U> for T
where U: TeamTryFrom<T>,

Source§

fn team_try_into(self, team: &Arc<LamellarTeam>) -> Result<U, Error>

Trys to convert this type into the (usually inferred) input type
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V