pub trait LamellarArrayMutIterators<T: Dist> {
type DistIter: DistributedIterator;
type LocalIter: LocalIterator;
// Required methods
fn dist_iter_mut(&self) -> Self::DistIter;
fn local_iter_mut(&self) -> Self::LocalIter;
}Expand description
The interface for creating the various lamellar array mutable iterator types
This is only implemented for Safe Array types, UnsafeArray directly provides unsafe versions of the same functions
Required Associated Types§
Sourcetype DistIter: DistributedIterator
type DistIter: DistributedIterator
The DistributedIterator type
Sourcetype LocalIter: LocalIterator
type LocalIter: LocalIterator
The LocalIteratortype
Required Methods§
Sourcefn dist_iter_mut(&self) -> Self::DistIter
fn dist_iter_mut(&self) -> Self::DistIter
Create a mutable DistributedIterator for this array
§Collective Operation
Requires all PEs associated with the array to enter the call otherwise deadlock will occur (i.e. barriers are being called internally) Throughout execution of the iteration, data movement may occur amongst various PEs
§Examples
use lamellar::array::prelude::*;
let world = LamellarWorldBuilder::new().build();
let my_pe = world.my_pe();
let array: LocalLockArray<usize> = LocalLockArray::new(&world,100,Distribution::Cyclic).block();
array.dist_iter_mut().for_each(move |elem| *elem = my_pe)
.block();Sourcefn local_iter_mut(&self) -> Self::LocalIter
fn local_iter_mut(&self) -> Self::LocalIter
Create a mutable LocalIterator for this array
§One-sided Operation
The iteration is launched and local to only the calling PE. No data movement from remote PEs is required
§Examples
use lamellar::array::prelude::*;
let world = LamellarWorldBuilder::new().build();
let my_pe = world.my_pe();
let array: LocalLockArray<usize> = LocalLockArray::new(&world,100,Distribution::Cyclic).block();
array.local_iter_mut().for_each(move |elem| *elem = my_pe)
.block();Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".