Struct lamellar::StridedArch
source · pub struct StridedArch { /* private fields */ }
Expand description
A grouping of PE’s forming a team using a “strided” based distribution pattern.
§examples
use lamellar::{LamellarWorldBuilder,StridedArch};
let world = LamellarWorldBuilder::new().build();
let num_pes = world.num_pes();
//create a team consisting of the "even" PEs in the world
let first_half_team = world.create_team_from_arch(StridedArch::new(
0, // start pe
2, // stride
(num_pes as f64 / 2.0).ceil() as usize, //num_pes in team
));
Implementations§
source§impl StridedArch
impl StridedArch
sourcepub fn new(start_pe: usize, stride: usize, num_team_pes: usize) -> StridedArch
pub fn new(start_pe: usize, stride: usize, num_team_pes: usize) -> StridedArch
Construct a new StrideArch using a starting PE, the stride length, and the number of PEs to include in the Block
§Examples
use lamellar::StridedArch;
StridedArch::new(
0, //start pe
4, //stride
5, //num_pes in team
);
// the team will consist of the 5 pes => 0,4,8,12,16
Trait Implementations§
source§impl Clone for StridedArch
impl Clone for StridedArch
source§fn clone(&self) -> StridedArch
fn clone(&self) -> StridedArch
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StridedArch
impl Debug for StridedArch
source§impl Hash for StridedArch
impl Hash for StridedArch
source§impl LamellarArch for StridedArch
impl LamellarArch for StridedArch
impl Copy for StridedArch
Auto Trait Implementations§
impl RefUnwindSafe for StridedArch
impl Send for StridedArch
impl Sync for StridedArch
impl Unpin for StridedArch
impl UnwindSafe for StridedArch
Blanket Implementations§
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