pub struct CartesianCommunicator(/* private fields */);
Expand description
A CartesianCommunicator
is an MPI communicator object where ranks are laid out in an
n-dimensional cartesian space. This gives ranks neighbors in each of those dimensions, and MPI
is able to optimize the layout of these ranks to improve physical locality.
§Standard Section(s)
7
Implementations§
Source§impl CartesianCommunicator
impl CartesianCommunicator
Sourcepub unsafe fn from_raw(raw: MPI_Comm) -> Option<CartesianCommunicator>
pub unsafe fn from_raw(raw: MPI_Comm) -> Option<CartesianCommunicator>
Given a valid MPI_Comm
handle in raw
, returns a CartesianCommunicator
value if, and
only if:
- The handle is not
MPI_COMM_NULL
- The topology of the communicator is
MPI_CART
Otherwise returns None.
§Parameters
raw
- Handle to a validMPI_Comm
object
§Safety
raw
must be a liveMPI_Comm
object.raw
must not be used after callingfrom_raw
.
Sourcepub unsafe fn from_raw_unchecked(raw: MPI_Comm) -> CartesianCommunicator
pub unsafe fn from_raw_unchecked(raw: MPI_Comm) -> CartesianCommunicator
Sourcepub fn num_dimensions(&self) -> Count
pub fn num_dimensions(&self) -> Count
Returns the number of dimensions that the Cartesian communicator was established over.
§Standard section(s)
7.5.5 MPI_Cartdim_get
Examples found in repository?
7fn main() {
8 let universe = mpi::initialize().unwrap();
9
10 let comm = universe.world();
11
12 if comm.size() < 4 {
13 return;
14 }
15
16 let cart_comm = {
17 let dims = [2, 2];
18 let periodic = [false, true];
19 let reorder = true;
20 if let Some(cart_comm) = comm.create_cartesian_communicator(&dims, &periodic, reorder) {
21 cart_comm
22 } else {
23 assert!(comm.rank() >= 4);
24 return;
25 }
26 };
27
28 assert_eq!(2, cart_comm.num_dimensions());
29
30 let mpi::topology::CartesianLayout {
31 dims,
32 periods,
33 coords,
34 } = cart_comm.get_layout();
35
36 assert_eq!([2 as mpi::Count, 2], &dims[..]);
37 assert_eq!([false, true], &periods[..]);
38
39 let xrank = coords[0];
40 let yrank = coords[1];
41
42 assert!(0 <= xrank && xrank < 2);
43 assert!(0 <= yrank && yrank < 2);
44
45 let xcomm = cart_comm.subgroup(&[true, false]);
46 let ycomm = cart_comm.subgroup(&[false, true]);
47
48 assert_eq!(2, xcomm.size());
49 assert_eq!(xrank, xcomm.rank());
50
51 assert_eq!(2, ycomm.size());
52 assert_eq!(yrank, ycomm.rank());
53
54 // the first dimension is non-periodic
55 let (x_src, x_dest) = cart_comm.shift(0, 1);
56 if xrank == 0 {
57 assert!(x_src.is_none());
58 assert!(x_dest.is_some());
59
60 let coords = cart_comm.rank_to_coordinates(x_dest.unwrap());
61 assert_eq!(1, coords[0]);
62 } else {
63 assert_eq!(1, xrank);
64
65 assert!(x_src.is_some());
66 assert!(x_dest.is_none());
67
68 let coords = cart_comm.rank_to_coordinates(x_src.unwrap());
69 assert_eq!(0, coords[0]);
70 }
71
72 // the second dimension is periodic
73 {
74 let (y_src, y_dest) = cart_comm.shift(1, 1);
75 assert!(y_src.is_some());
76 assert!(y_dest.is_some());
77
78 let y_src_coords = cart_comm.rank_to_coordinates(y_src.unwrap());
79 assert_eq!((yrank - 1) & 0b1, y_src_coords[1]);
80
81 let y_dest_coords = cart_comm.rank_to_coordinates(y_dest.unwrap());
82 assert_eq!((yrank + 1) & 0b1, y_dest_coords[1]);
83 }
84
85 // second dimension shift by 2 should be identity
86 {
87 let (y_src, y_dest) = cart_comm.shift(1, 2);
88 assert_eq!(comm.rank(), y_src.unwrap());
89 assert_eq!(comm.rank(), y_dest.unwrap());
90 }
91}
Sourcepub unsafe fn get_layout_into_unchecked(
&self,
dims: &mut [Count],
periods: &mut [bool],
coords: &mut [Count],
)
pub unsafe fn get_layout_into_unchecked( &self, dims: &mut [Count], periods: &mut [bool], coords: &mut [Count], )
Returns the topological structure of the Cartesian communicator
Prefer get_layout_into
§Parameters
dims
- array of spatial extents for the cartesian spaceperiods
- Must match length ofdims
.periods[i]
indicates if axis i is periodic. i.e. if true, the element atdims[i] - 1
in axis i is a neighbor of element 0 in axis icoords
-coords[i]
is the location offset in axis i of this rank
§Standard section(s)
7.5.5 MPI_Cart_get
§Safety
Behavior is undefined if dims
, periods
, and coords
are not of length
num_dimensions
.
§Panics
Invalid boolean value ({}) from the MPI implementation
Sourcepub fn get_layout_into(
&self,
dims: &mut [Count],
periods: &mut [bool],
coords: &mut [Count],
)
pub fn get_layout_into( &self, dims: &mut [Count], periods: &mut [bool], coords: &mut [Count], )
Returns the topological structure of the Cartesian communicator
§Panics
if dims
, periods
, and coords
are not of length
num_dimensions
.
§Parameters
dims
- array of spatial extents for the cartesian spaceperiods
- Must match length ofdims
.periods[i]
indicates if axis i is periodic. i.e. if true, the element atdims[i] - 1
in axis i is a neighbor of element 0 in axis icoords
-coords[i]
is the location offset in axis i of this rank
§Standard section(s)
7.5.5 MPI_Cart_get
Sourcepub fn get_layout(&self) -> CartesianLayout
pub fn get_layout(&self) -> CartesianLayout
Returns the topological structure of the Cartesian communicator
§Standard section(s)
7.5.5 [MPI_Cart_get
]
Examples found in repository?
7fn main() {
8 let universe = mpi::initialize().unwrap();
9
10 let comm = universe.world();
11
12 if comm.size() < 4 {
13 return;
14 }
15
16 let cart_comm = {
17 let dims = [2, 2];
18 let periodic = [false, true];
19 let reorder = true;
20 if let Some(cart_comm) = comm.create_cartesian_communicator(&dims, &periodic, reorder) {
21 cart_comm
22 } else {
23 assert!(comm.rank() >= 4);
24 return;
25 }
26 };
27
28 assert_eq!(2, cart_comm.num_dimensions());
29
30 let mpi::topology::CartesianLayout {
31 dims,
32 periods,
33 coords,
34 } = cart_comm.get_layout();
35
36 assert_eq!([2 as mpi::Count, 2], &dims[..]);
37 assert_eq!([false, true], &periods[..]);
38
39 let xrank = coords[0];
40 let yrank = coords[1];
41
42 assert!(0 <= xrank && xrank < 2);
43 assert!(0 <= yrank && yrank < 2);
44
45 let xcomm = cart_comm.subgroup(&[true, false]);
46 let ycomm = cart_comm.subgroup(&[false, true]);
47
48 assert_eq!(2, xcomm.size());
49 assert_eq!(xrank, xcomm.rank());
50
51 assert_eq!(2, ycomm.size());
52 assert_eq!(yrank, ycomm.rank());
53
54 // the first dimension is non-periodic
55 let (x_src, x_dest) = cart_comm.shift(0, 1);
56 if xrank == 0 {
57 assert!(x_src.is_none());
58 assert!(x_dest.is_some());
59
60 let coords = cart_comm.rank_to_coordinates(x_dest.unwrap());
61 assert_eq!(1, coords[0]);
62 } else {
63 assert_eq!(1, xrank);
64
65 assert!(x_src.is_some());
66 assert!(x_dest.is_none());
67
68 let coords = cart_comm.rank_to_coordinates(x_src.unwrap());
69 assert_eq!(0, coords[0]);
70 }
71
72 // the second dimension is periodic
73 {
74 let (y_src, y_dest) = cart_comm.shift(1, 1);
75 assert!(y_src.is_some());
76 assert!(y_dest.is_some());
77
78 let y_src_coords = cart_comm.rank_to_coordinates(y_src.unwrap());
79 assert_eq!((yrank - 1) & 0b1, y_src_coords[1]);
80
81 let y_dest_coords = cart_comm.rank_to_coordinates(y_dest.unwrap());
82 assert_eq!((yrank + 1) & 0b1, y_dest_coords[1]);
83 }
84
85 // second dimension shift by 2 should be identity
86 {
87 let (y_src, y_dest) = cart_comm.shift(1, 2);
88 assert_eq!(comm.rank(), y_src.unwrap());
89 assert_eq!(comm.rank(), y_dest.unwrap());
90 }
91}
Sourcepub unsafe fn coordinates_to_rank_unchecked(&self, coords: &[Count]) -> Rank
pub unsafe fn coordinates_to_rank_unchecked(&self, coords: &[Count]) -> Rank
Converts a set of cartesian coordinates to its rank in the CartesianCommunicator
.
Coordinates in periodic axes that are out of range are shifted back into the dimensions of the communiactor.
Prefer coordinates_to_rank
§Parameters
coords
-coords[i]
is a location offset in axis i
§Standard section(s)
7.5.5 MPI_Cart_rank
§Safety
- Behavior is undefined if
coords
is not of lengthnum_dimensions
. - Behavior is undefined if any coordinates in non-periodic axes are outside the dimensions
Sourcepub fn coordinates_to_rank(&self, coords: &[Count]) -> Rank
pub fn coordinates_to_rank(&self, coords: &[Count]) -> Rank
Converts a set of cartesian coordinates to its rank in the CartesianCommunicator
.
Panics if coords
is not of length num_dimensions
.
Coordinates in periodic axes that are out of range are shifted back into the dimensions of the communiactor.
§Panics
if any coordinates in non-periodic axes are outside the dimensions of the communicator.
§Parameters
coords
-coords[i]
is a location offset in axis i
§Standard section(s)
7.5.5 MPI_Cart_rank
Sourcepub unsafe fn rank_to_coordinates_into_unchecked(
&self,
rank: Rank,
coords: &mut [Count],
)
pub unsafe fn rank_to_coordinates_into_unchecked( &self, rank: Rank, coords: &mut [Count], )
Receives into coords
the cartesian coordinates of rank
.
Prefer rank_to_coordinates_into
§Parameters
rank
- A rank in the communicatorcoords
-coords[i]
is the cartesian coordinate ofrank
in axis i
§Standard section(s)
7.5.5 MPI_Cart_coords
§Safety
Behavior is undefined if rank
is not a non-negative value less than
size
.
Sourcepub fn rank_to_coordinates_into(&self, rank: Rank, coords: &mut [Count])
pub fn rank_to_coordinates_into(&self, rank: Rank, coords: &mut [Count])
Sourcepub fn rank_to_coordinates(&self, rank: Rank) -> Vec<Count>
pub fn rank_to_coordinates(&self, rank: Rank) -> Vec<Count>
Returns an array of coords
with the cartesian coordinates of rank
, where coords[i]
is
the cartesian coordinate of rank
in axis i.
§Panics
if rank
is not a non-negative value less than
size
.
§Parameters
rank
- A rank in the communicator
§Standard section(s)
7.5.5 MPI_Cart_coords
Examples found in repository?
7fn main() {
8 let universe = mpi::initialize().unwrap();
9
10 let comm = universe.world();
11
12 if comm.size() < 4 {
13 return;
14 }
15
16 let cart_comm = {
17 let dims = [2, 2];
18 let periodic = [false, true];
19 let reorder = true;
20 if let Some(cart_comm) = comm.create_cartesian_communicator(&dims, &periodic, reorder) {
21 cart_comm
22 } else {
23 assert!(comm.rank() >= 4);
24 return;
25 }
26 };
27
28 assert_eq!(2, cart_comm.num_dimensions());
29
30 let mpi::topology::CartesianLayout {
31 dims,
32 periods,
33 coords,
34 } = cart_comm.get_layout();
35
36 assert_eq!([2 as mpi::Count, 2], &dims[..]);
37 assert_eq!([false, true], &periods[..]);
38
39 let xrank = coords[0];
40 let yrank = coords[1];
41
42 assert!(0 <= xrank && xrank < 2);
43 assert!(0 <= yrank && yrank < 2);
44
45 let xcomm = cart_comm.subgroup(&[true, false]);
46 let ycomm = cart_comm.subgroup(&[false, true]);
47
48 assert_eq!(2, xcomm.size());
49 assert_eq!(xrank, xcomm.rank());
50
51 assert_eq!(2, ycomm.size());
52 assert_eq!(yrank, ycomm.rank());
53
54 // the first dimension is non-periodic
55 let (x_src, x_dest) = cart_comm.shift(0, 1);
56 if xrank == 0 {
57 assert!(x_src.is_none());
58 assert!(x_dest.is_some());
59
60 let coords = cart_comm.rank_to_coordinates(x_dest.unwrap());
61 assert_eq!(1, coords[0]);
62 } else {
63 assert_eq!(1, xrank);
64
65 assert!(x_src.is_some());
66 assert!(x_dest.is_none());
67
68 let coords = cart_comm.rank_to_coordinates(x_src.unwrap());
69 assert_eq!(0, coords[0]);
70 }
71
72 // the second dimension is periodic
73 {
74 let (y_src, y_dest) = cart_comm.shift(1, 1);
75 assert!(y_src.is_some());
76 assert!(y_dest.is_some());
77
78 let y_src_coords = cart_comm.rank_to_coordinates(y_src.unwrap());
79 assert_eq!((yrank - 1) & 0b1, y_src_coords[1]);
80
81 let y_dest_coords = cart_comm.rank_to_coordinates(y_dest.unwrap());
82 assert_eq!((yrank + 1) & 0b1, y_dest_coords[1]);
83 }
84
85 // second dimension shift by 2 should be identity
86 {
87 let (y_src, y_dest) = cart_comm.shift(1, 2);
88 assert_eq!(comm.rank(), y_src.unwrap());
89 assert_eq!(comm.rank(), y_dest.unwrap());
90 }
91}
Sourcepub unsafe fn shift_unchecked(
&self,
dimension: Count,
displacement: Count,
) -> (Option<Rank>, Option<Rank>)
pub unsafe fn shift_unchecked( &self, dimension: Count, displacement: Count, ) -> (Option<Rank>, Option<Rank>)
Retrieves targets in dimension
shifted from the current rank by displacing in the negative
direction by displacement
units for the first returned rank and in the positive direction
for the second returned rank.
Prefer shift
§Parameters
dimension
- which axis to shift indisplacement
- what offset to shift by in each direction
§Standard section(s)
7.5.6 MPI_Cart_shift
§Safety
Behavior is undefined if dimension
is not of length
num_dimensions
.
Sourcepub fn shift(
&self,
dimension: Count,
displacement: Count,
) -> (Option<Rank>, Option<Rank>)
pub fn shift( &self, dimension: Count, displacement: Count, ) -> (Option<Rank>, Option<Rank>)
Retrieves targets in dimension
shifted from the current rank by displacing in the negative
direction by displacement
units for the first returned rank and in the positive direction
for the second returned rank.
§Parameters
dimension
- which axis to shift indisplacement
- what offset to shift by in each direction
§Standard section(s)
7.5.6 MPI_Cart_shift
§Panics
if dimension
is not of length num_dimensions
.
Examples found in repository?
7fn main() {
8 let universe = mpi::initialize().unwrap();
9
10 let comm = universe.world();
11
12 if comm.size() < 4 {
13 return;
14 }
15
16 let cart_comm = {
17 let dims = [2, 2];
18 let periodic = [false, true];
19 let reorder = true;
20 if let Some(cart_comm) = comm.create_cartesian_communicator(&dims, &periodic, reorder) {
21 cart_comm
22 } else {
23 assert!(comm.rank() >= 4);
24 return;
25 }
26 };
27
28 assert_eq!(2, cart_comm.num_dimensions());
29
30 let mpi::topology::CartesianLayout {
31 dims,
32 periods,
33 coords,
34 } = cart_comm.get_layout();
35
36 assert_eq!([2 as mpi::Count, 2], &dims[..]);
37 assert_eq!([false, true], &periods[..]);
38
39 let xrank = coords[0];
40 let yrank = coords[1];
41
42 assert!(0 <= xrank && xrank < 2);
43 assert!(0 <= yrank && yrank < 2);
44
45 let xcomm = cart_comm.subgroup(&[true, false]);
46 let ycomm = cart_comm.subgroup(&[false, true]);
47
48 assert_eq!(2, xcomm.size());
49 assert_eq!(xrank, xcomm.rank());
50
51 assert_eq!(2, ycomm.size());
52 assert_eq!(yrank, ycomm.rank());
53
54 // the first dimension is non-periodic
55 let (x_src, x_dest) = cart_comm.shift(0, 1);
56 if xrank == 0 {
57 assert!(x_src.is_none());
58 assert!(x_dest.is_some());
59
60 let coords = cart_comm.rank_to_coordinates(x_dest.unwrap());
61 assert_eq!(1, coords[0]);
62 } else {
63 assert_eq!(1, xrank);
64
65 assert!(x_src.is_some());
66 assert!(x_dest.is_none());
67
68 let coords = cart_comm.rank_to_coordinates(x_src.unwrap());
69 assert_eq!(0, coords[0]);
70 }
71
72 // the second dimension is periodic
73 {
74 let (y_src, y_dest) = cart_comm.shift(1, 1);
75 assert!(y_src.is_some());
76 assert!(y_dest.is_some());
77
78 let y_src_coords = cart_comm.rank_to_coordinates(y_src.unwrap());
79 assert_eq!((yrank - 1) & 0b1, y_src_coords[1]);
80
81 let y_dest_coords = cart_comm.rank_to_coordinates(y_dest.unwrap());
82 assert_eq!((yrank + 1) & 0b1, y_dest_coords[1]);
83 }
84
85 // second dimension shift by 2 should be identity
86 {
87 let (y_src, y_dest) = cart_comm.shift(1, 2);
88 assert_eq!(comm.rank(), y_src.unwrap());
89 assert_eq!(comm.rank(), y_dest.unwrap());
90 }
91}
Sourcepub unsafe fn subgroup_unchecked(
&self,
retain: &[bool],
) -> CartesianCommunicator
pub unsafe fn subgroup_unchecked( &self, retain: &[bool], ) -> CartesianCommunicator
Partitions an existing Cartesian communicator into a new Cartesian communicator in a lower dimension.
Prefer subgroup
§Parameters
retain
- ifretain[i]
is true, then axis i is retained in the new communicator
§Standard section(s)
7.5.7 MPI_Cart_sub
§Safety
Behavior is undefined if retain
is not of length
num_dimensions
.
Sourcepub fn subgroup(&self, retain: &[bool]) -> CartesianCommunicator
pub fn subgroup(&self, retain: &[bool]) -> CartesianCommunicator
Partitions an existing Cartesian communicator into a new Cartesian communicator in a lower dimension.
§Panics
if retain
is not of length num_dimensions
.
§Parameters
retain
- ifretain[i]
is true, then axis i is retained in the new communicator
§Standard section(s)
7.5.7 MPI_Cart_sub
Examples found in repository?
7fn main() {
8 let universe = mpi::initialize().unwrap();
9
10 let comm = universe.world();
11
12 if comm.size() < 4 {
13 return;
14 }
15
16 let cart_comm = {
17 let dims = [2, 2];
18 let periodic = [false, true];
19 let reorder = true;
20 if let Some(cart_comm) = comm.create_cartesian_communicator(&dims, &periodic, reorder) {
21 cart_comm
22 } else {
23 assert!(comm.rank() >= 4);
24 return;
25 }
26 };
27
28 assert_eq!(2, cart_comm.num_dimensions());
29
30 let mpi::topology::CartesianLayout {
31 dims,
32 periods,
33 coords,
34 } = cart_comm.get_layout();
35
36 assert_eq!([2 as mpi::Count, 2], &dims[..]);
37 assert_eq!([false, true], &periods[..]);
38
39 let xrank = coords[0];
40 let yrank = coords[1];
41
42 assert!(0 <= xrank && xrank < 2);
43 assert!(0 <= yrank && yrank < 2);
44
45 let xcomm = cart_comm.subgroup(&[true, false]);
46 let ycomm = cart_comm.subgroup(&[false, true]);
47
48 assert_eq!(2, xcomm.size());
49 assert_eq!(xrank, xcomm.rank());
50
51 assert_eq!(2, ycomm.size());
52 assert_eq!(yrank, ycomm.rank());
53
54 // the first dimension is non-periodic
55 let (x_src, x_dest) = cart_comm.shift(0, 1);
56 if xrank == 0 {
57 assert!(x_src.is_none());
58 assert!(x_dest.is_some());
59
60 let coords = cart_comm.rank_to_coordinates(x_dest.unwrap());
61 assert_eq!(1, coords[0]);
62 } else {
63 assert_eq!(1, xrank);
64
65 assert!(x_src.is_some());
66 assert!(x_dest.is_none());
67
68 let coords = cart_comm.rank_to_coordinates(x_src.unwrap());
69 assert_eq!(0, coords[0]);
70 }
71
72 // the second dimension is periodic
73 {
74 let (y_src, y_dest) = cart_comm.shift(1, 1);
75 assert!(y_src.is_some());
76 assert!(y_dest.is_some());
77
78 let y_src_coords = cart_comm.rank_to_coordinates(y_src.unwrap());
79 assert_eq!((yrank - 1) & 0b1, y_src_coords[1]);
80
81 let y_dest_coords = cart_comm.rank_to_coordinates(y_dest.unwrap());
82 assert_eq!((yrank + 1) & 0b1, y_dest_coords[1]);
83 }
84
85 // second dimension shift by 2 should be identity
86 {
87 let (y_src, y_dest) = cart_comm.shift(1, 2);
88 assert_eq!(comm.rank(), y_src.unwrap());
89 assert_eq!(comm.rank(), y_dest.unwrap());
90 }
91}
Trait Implementations§
Source§impl AsCommunicator for CartesianCommunicator
impl AsCommunicator for CartesianCommunicator
Source§type Out = CartesianCommunicator
type Out = CartesianCommunicator
Source§fn as_communicator(&self) -> &Self::Out
fn as_communicator(&self) -> &Self::Out
Source§impl AsRaw for CartesianCommunicator
impl AsRaw for CartesianCommunicator
Source§impl Communicator for CartesianCommunicator
impl Communicator for CartesianCommunicator
Source§fn rank(&self) -> Rank
fn rank(&self) -> Rank
Rank
that identifies the calling process within this communicator Read moreSource§fn any_process(&self) -> AnyProcess<'_, Self>where
Self: Sized,
fn any_process(&self) -> AnyProcess<'_, Self>where
Self: Sized,
AnyProcess
identifier that can be used, e.g. as a Source
in point to point
communication.Source§fn this_process(&self) -> Process<'_, Self>where
Self: Sized,
fn this_process(&self) -> Process<'_, Self>where
Self: Sized,
Process
for the calling processSource§fn compare<C>(&self, other: &C) -> CommunicatorRelationwhere
C: Communicator + ?Sized,
fn compare<C>(&self, other: &C) -> CommunicatorRelationwhere
C: Communicator + ?Sized,
Source§fn duplicate(&self) -> UserCommunicator
fn duplicate(&self) -> UserCommunicator
Source§fn split_by_color(&self, color: Color) -> Option<UserCommunicator>
fn split_by_color(&self, color: Color) -> Option<UserCommunicator>
Source§fn split_by_color_with_key(
&self,
color: Color,
key: Key,
) -> Option<UserCommunicator>
fn split_by_color_with_key( &self, color: Color, key: Key, ) -> Option<UserCommunicator>
Source§fn split_by_subgroup_collective<G>(&self, group: &G) -> Option<UserCommunicator>
fn split_by_subgroup_collective<G>(&self, group: &G) -> Option<UserCommunicator>
Source§fn split_by_subgroup<G>(&self, group: &G) -> Option<UserCommunicator>
fn split_by_subgroup<G>(&self, group: &G) -> Option<UserCommunicator>
Source§fn split_by_subgroup_with_tag<G>(
&self,
group: &G,
tag: Tag,
) -> Option<UserCommunicator>
fn split_by_subgroup_with_tag<G>( &self, group: &G, tag: Tag, ) -> Option<UserCommunicator>
Source§fn create_cartesian_communicator(
&self,
dims: &[Count],
periods: &[bool],
reorder: bool,
) -> Option<CartesianCommunicator>
fn create_cartesian_communicator( &self, dims: &[Count], periods: &[bool], reorder: bool, ) -> Option<CartesianCommunicator>
Source§fn cartesian_map(&self, dims: &[Count], periods: &[bool]) -> Option<Rank>
fn cartesian_map(&self, dims: &[Count], periods: &[bool]) -> Option<Rank>
create_cartesian_communicator
had been called
with dims
, periods
, and reorder = true
. Read moreSource§fn pack_size<Dt>(&self, incount: Count, datatype: &Dt) -> Countwhere
Dt: Datatype,
fn pack_size<Dt>(&self, incount: Count, datatype: &Dt) -> Countwhere
Dt: Datatype,
Source§fn pack<Buf>(&self, inbuf: &Buf) -> Vec<u8> ⓘ
fn pack<Buf>(&self, inbuf: &Buf) -> Vec<u8> ⓘ
unpack
to convert back into a specific datatype. Read moreSource§impl From<CartesianCommunicator> for UserCommunicator
impl From<CartesianCommunicator> for UserCommunicator
Source§fn from(cart_comm: CartesianCommunicator) -> Self
fn from(cart_comm: CartesianCommunicator) -> Self
Auto Trait Implementations§
impl Freeze for CartesianCommunicator
impl RefUnwindSafe for CartesianCommunicator
impl !Send for CartesianCommunicator
impl !Sync for CartesianCommunicator
impl Unpin for CartesianCommunicator
impl UnwindSafe for CartesianCommunicator
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
Source§impl<C> CommunicatorCollectives for Cwhere
C: Communicator,
impl<C> CommunicatorCollectives for Cwhere
C: Communicator,
Source§fn all_gather_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_gather_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Source§fn all_gather_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_gather_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Source§fn all_to_all_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_to_all_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Source§fn all_to_all_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_to_all_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Source§fn all_reduce_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn all_reduce_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
op
of the input data in sendbuf
and
stores the result in recvbuf
on all processes. Read moreSource§fn reduce_scatter_block_into<S, R, O>(
&self,
sendbuf: &S,
recvbuf: &mut R,
op: O,
)
fn reduce_scatter_block_into<S, R, O>( &self, sendbuf: &S, recvbuf: &mut R, op: O, )
op
of the input data in
sendbuf
and scatters the result into equal sized blocks in the receive buffers on all
processes. Read moreSource§fn scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
sendbuf
into recvbuf
under
operation op
. Read moreSource§fn exclusive_scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn exclusive_scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
sendbuf
into recvbuf
under
operation op
. Read moreSource§fn immediate_barrier(&self) -> Request<'static>
fn immediate_barrier(&self) -> Request<'static>
Communicator
Read moreSource§fn immediate_all_gather_into<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
) -> Request<'a, Sc>
fn immediate_all_gather_into<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, ) -> Request<'a, Sc>
sendbuf
s into all rcevbuf
s on all
processes in the communicator. Read moreSource§fn immediate_all_gather_varcount_into<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
) -> Request<'a, Sc>
fn immediate_all_gather_varcount_into<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, ) -> Request<'a, Sc>
sendbuf
s into all rcevbuf
s on all
processes in the communicator. Read moreSource§fn immediate_all_to_all_into<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
) -> Request<'a, Sc>
fn immediate_all_to_all_into<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, ) -> Request<'a, Sc>
Source§fn immediate_all_to_all_varcount_into<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
) -> Request<'a, Sc>
fn immediate_all_to_all_varcount_into<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, ) -> Request<'a, Sc>
Source§fn immediate_all_reduce_into<'a, Sc, S, R, O>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O,
) -> Request<'a, Sc>
fn immediate_all_reduce_into<'a, Sc, S, R, O>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O, ) -> Request<'a, Sc>
op
of the input data in
sendbuf
and stores the result in recvbuf
on all processes. Read moreSource§fn immediate_reduce_scatter_block_into<'a, Sc, S, R, O>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O,
) -> Request<'a, Sc>
fn immediate_reduce_scatter_block_into<'a, Sc, S, R, O>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O, ) -> Request<'a, Sc>
op
of the
input data in sendbuf
and scatters the result into equal sized blocks in the receive
buffers on all processes. Read moreSource§fn immediate_scan_into<'a, Sc, S, R, O>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O,
) -> Request<'a, Sc>
fn immediate_scan_into<'a, Sc, S, R, O>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O, ) -> Request<'a, Sc>
sendbuf
into
recvbuf
under operation op
. Read more