Struct lamellar::BlockedArch

source ·
pub struct BlockedArch { /* private fields */ }
Expand description

A grouping of PE’s forming a team using a “block” based distribution pattern.

PEs in the group are contiguous (with respect to their PE id, not necessarily their pyhsical location in the distributed envrionment).

§examples

 use lamellar::{LamellarWorldBuilder,BlockedArch};

 let world = LamellarWorldBuilder::new().build();
 let num_pes = world.num_pes();

 //create a team consisting of the first half of PEs in the world
 let first_half_team = world.create_team_from_arch(BlockedArch::new(
    0,                                      //start pe
    (num_pes as f64 / 2.0).ceil() as usize, //num_pes in team
 ));

Implementations§

source§

impl BlockedArch

source

pub fn new(start_pe: usize, num_team_pes: usize) -> BlockedArch

Construct a new Block using a starting PE and the number of PEs to include in the Block

§Examples
 use lamellar::BlockedArch;

 BlockedArch::new(
    4, //start pe
    5, //num_pes in team
 );
 // the team will consist of the 5 pes => 4,5,6,7,8

Trait Implementations§

source§

impl Clone for BlockedArch

source§

fn clone(&self) -> BlockedArch

Returns a copy 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 Debug for BlockedArch

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for BlockedArch

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LamellarArch for BlockedArch

source§

fn num_pes(&self) -> usize

The number of PEs in the team defined by this LamellarArch
source§

fn start_pe(&self) -> usize

The id of the first (lowest numbered) PE in the team
source§

fn end_pe(&self) -> usize

The id of the first (highest numbered) PE in the team
source§

fn parent_pe_id(&self, team_pe: &usize) -> Result<usize, IdError>

Converts a (sub)team PE id into the id space of the Parent team Read more
source§

fn team_pe_id(&self, parent_pe: &usize) -> Result<usize, IdError>

Converts a Parent team PE id into the id space of the team specified by this LamellarArch Read more
source§

impl Copy for BlockedArch

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> 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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

source§

fn team_into(self, team: &Pin<Arc<LamellarTeamRT>>) -> 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: &Pin<Arc<LamellarTeamRT>>) -> Result<U, Error>

Trys to convert this type into the (usually inferred) input type
source§

impl<T> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

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