pub struct LocalIterMut<'a, T: Dist, A: LamellarArray<T>> { /* private fields */ }Expand description
Mutable LamellarArray local iterator
This struct is created by calling local_iter_mut on any of the LamellarWriteArray types
§Examples
use lamellar::array::prelude::*;
let world = LamellarWorldBuilder::new().build();
let array = AtomicArray::<usize>::new(&world,100,Distribution::Block).block();
let my_pe = world.my_pe();
let local_iter = array.local_iter_mut().for_each(move|e| e.store(my_pe) );
local_iter.block();Trait Implementations§
Source§impl<'a, T: Dist, A: LamellarArray<T>> Debug for LocalIterMut<'a, T, A>
impl<'a, T: Dist, A: LamellarArray<T>> Debug for LocalIterMut<'a, T, A>
Source§impl<T: Dist + 'static, A: LamellarArray<T> + SyncSend + LocalIteratorLauncher + Clone + 'static> IndexedLocalIterator for LocalIterMut<'static, T, A>
impl<T: Dist + 'static, A: LamellarArray<T> + SyncSend + LocalIteratorLauncher + Clone + 'static> IndexedLocalIterator for LocalIterMut<'static, T, A>
Source§fn iterator_index(&self, index: usize) -> Option<usize>
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>
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>
fn chunks(self, size: usize) -> Chunks<Self>
Split an iterator into fixed-sized chunks Read more
Source§fn skip(self, count: usize) -> Skip<Self>
fn skip(self, count: usize) -> Skip<Self>
An iterator that skips the first
n elements Read moreSource§fn step_by(self, step_size: usize) -> StepBy<Self>
fn step_by(self, step_size: usize) -> StepBy<Self>
An iterator that steps by
step_size elements Read moreSource§fn take(self, count: usize) -> Take<Self>
fn take(self, count: usize) -> Take<Self>
An iterator that takes the first
n elements Read moreSource§fn zip<I: IndexedLocalIterator>(self, iter: I) -> Zip<Self, I>
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 moreSource§impl<T: Dist + 'static, A: LamellarArray<T> + SyncSend + LocalIteratorLauncher + Clone + 'static> LocalIterator for LocalIterMut<'static, T, A>
impl<T: Dist + 'static, A: LamellarArray<T> + SyncSend + LocalIteratorLauncher + Clone + 'static> LocalIterator for LocalIterMut<'static, T, A>
Source§type Item = &'static mut T
type Item = &'static mut T
The type of item this local iterator produces
Source§fn next(&mut self) -> Option<Self::Item>
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
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)
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>
fn filter<F>(self, op: F) -> Filter<Self, F>
Applies
op on each element of this iterator, producing a new iterator with only the elements that gave true results Read moreSource§fn filter_map<F, R>(self, op: F) -> FilterMap<Self, F>
fn filter_map<F, R>(self, op: F) -> FilterMap<Self, F>
Applies
op on each element of this iterator to get an Option, producing a new iterator with only the elements that return Some Read moreSource§fn map<F, R>(self, op: F) -> Map<Self, F>
fn map<F, R>(self, op: F) -> Map<Self, F>
Applies
op to each element producing a new iterator with the results Read moreSource§fn monotonic(self) -> Monotonic<Self>
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 moreSource§fn for_each<F>(&self, op: F) -> LocalIterForEachHandle ⓘ
fn for_each<F>(&self, op: F) -> LocalIterForEachHandle ⓘ
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 ⓘ
fn for_each_with_schedule<F>( &self, sched: Schedule, op: F, ) -> LocalIterForEachHandle ⓘ
Source§fn for_each_async<F, Fut>(&self, op: F) -> LocalIterForEachHandle ⓘ
fn for_each_async<F, Fut>(&self, op: F) -> LocalIterForEachHandle ⓘ
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 ⓘ
fn for_each_async_with_schedule<F, Fut>( &self, sched: Schedule, op: F, ) -> LocalIterForEachHandle ⓘ
Source§fn reduce<F>(&self, op: F) -> LocalIterReduceHandle<Self::Item, F> ⓘ
fn reduce<F>(&self, op: F) -> LocalIterReduceHandle<Self::Item, F> ⓘ
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> ⓘ
fn reduce_with_schedule<F>( &self, sched: Schedule, op: F, ) -> LocalIterReduceHandle<Self::Item, F> ⓘ
Source§fn collect<A>(&self, d: Distribution) -> LocalIterCollectHandle<Self::Item, A> ⓘwhere
Self::Item: Dist + ArrayOps,
A: AsyncTeamFrom<(Vec<Self::Item>, Distribution)> + SyncSend + Clone + 'static,
fn collect<A>(&self, d: Distribution) -> LocalIterCollectHandle<Self::Item, A> ⓘwhere
Self::Item: Dist + ArrayOps,
A: AsyncTeamFrom<(Vec<Self::Item>, Distribution)> + SyncSend + Clone + 'static,
Collects the elements of the local iterator into the specified container type Read more
Source§fn collect_with_schedule<A>(
&self,
sched: Schedule,
d: Distribution,
) -> LocalIterCollectHandle<Self::Item, A> ⓘwhere
Self::Item: Dist + ArrayOps,
A: AsyncTeamFrom<(Vec<Self::Item>, Distribution)> + SyncSend + Clone + 'static,
fn collect_with_schedule<A>(
&self,
sched: Schedule,
d: Distribution,
) -> LocalIterCollectHandle<Self::Item, A> ⓘwhere
Self::Item: Dist + ArrayOps,
A: AsyncTeamFrom<(Vec<Self::Item>, Distribution)> + SyncSend + Clone + 'static,
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,
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,
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,
Source§fn count(&self) -> LocalIterCountHandle ⓘ
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 ⓘ
fn count_with_schedule(&self, sched: Schedule) -> LocalIterCountHandle ⓘ
Auto Trait Implementations§
impl<'a, T, A> Freeze for LocalIterMut<'a, T, A>where
A: Freeze,
impl<'a, T, A> RefUnwindSafe for LocalIterMut<'a, T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, A> Send for LocalIterMut<'a, T, A>where
A: Send,
impl<'a, T, A> Sync for LocalIterMut<'a, T, A>where
A: Sync,
impl<'a, T, A> Unpin for LocalIterMut<'a, T, A>where
A: Unpin,
impl<'a, T, A> UnwindSafe for LocalIterMut<'a, T, A>where
A: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T, U> AsyncTeamInto<U> for Twhere
T: Send,
U: AsyncTeamFrom<T>,
impl<T, U> AsyncTeamInto<U> for Twhere
T: Send,
U: AsyncTeamFrom<T>,
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> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TeamInto<U> for Twhere
U: TeamFrom<T>,
impl<T, U> TeamInto<U> for Twhere
U: TeamFrom<T>,
Source§fn team_into(self, team: &Arc<LamellarTeam>) -> U
fn team_into(self, team: &Arc<LamellarTeam>) -> U
converts this type into the (usually inferred) input type
Source§impl<T, U> TeamTryInto<U> for Twhere
U: TeamTryFrom<T>,
impl<T, U> TeamTryInto<U> for Twhere
U: TeamTryFrom<T>,
Source§fn team_try_into(self, team: &Arc<LamellarTeam>) -> Result<U, Error>
fn team_try_into(self, team: &Arc<LamellarTeam>) -> Result<U, Error>
Trys to convert this type into the (usually inferred) input type