This source file includes following definitions.
- Get_size
- Get_rank
- Translate_ranks
- Compare
- Union
- Intersect
- Difference
- Incl
- Excl
- Range_incl
- Range_excl
- Free
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 inline int
26 MPI::Group::Get_size() const
27 {
28 int size;
29 (void)MPI_Group_size(mpi_group, &size);
30 return size;
31 }
32
33 inline int
34 MPI::Group::Get_rank() const
35 {
36 int myrank;
37 (void)MPI_Group_rank(mpi_group, &myrank);
38 return myrank;
39 }
40
41 inline void
42 MPI::Group::Translate_ranks (const MPI::Group& group1, int n,
43 const int ranks1[],
44 const MPI::Group& group2, int ranks2[])
45 {
46 (void)MPI_Group_translate_ranks(group1, n, const_cast<int *>(ranks1), group2, const_cast<int *>(ranks2));
47 }
48
49 inline int
50 MPI::Group::Compare(const MPI::Group& group1, const MPI::Group& group2)
51 {
52 int result;
53 (void)MPI_Group_compare(group1, group2, &result);
54 return result;
55 }
56
57 inline MPI::Group
58 MPI::Group::Union(const MPI::Group &group1, const MPI::Group &group2)
59 {
60 MPI_Group newgroup;
61 (void)MPI_Group_union(group1, group2, &newgroup);
62 return newgroup;
63 }
64
65 inline MPI::Group
66 MPI::Group::Intersect(const MPI::Group &group1, const MPI::Group &group2)
67 {
68 MPI_Group newgroup;
69 (void)MPI_Group_intersection( group1, group2, &newgroup);
70 return newgroup;
71 }
72
73 inline MPI::Group
74 MPI::Group::Difference(const MPI::Group &group1, const MPI::Group &group2)
75 {
76 MPI_Group newgroup;
77 (void)MPI_Group_difference(group1, group2, &newgroup);
78 return newgroup;
79 }
80
81 inline MPI::Group
82 MPI::Group::Incl(int n, const int ranks[]) const
83 {
84 MPI_Group newgroup;
85 (void)MPI_Group_incl(mpi_group, n, const_cast<int *>(ranks), &newgroup);
86 return newgroup;
87 }
88
89 inline MPI::Group
90 MPI::Group::Excl(int n, const int ranks[]) const
91 {
92 MPI_Group newgroup;
93 (void)MPI_Group_excl(mpi_group, n, const_cast<int *>(ranks), &newgroup);
94 return newgroup;
95 }
96
97 inline MPI::Group
98 MPI::Group::Range_incl(int n, const int ranges[][3]) const
99 {
100 MPI_Group newgroup;
101 (void)MPI_Group_range_incl(mpi_group, n,
102 #if OMPI_CXX_SUPPORTS_2D_CONST_CAST
103 const_cast<int(*)[3]>(ranges),
104 #else
105 (int(*)[3]) ranges,
106 #endif
107 &newgroup);
108 return newgroup;
109 }
110
111 inline MPI::Group
112 MPI::Group::Range_excl(int n, const int ranges[][3]) const
113 {
114 MPI_Group newgroup;
115 (void)MPI_Group_range_excl(mpi_group, n,
116 #if OMPI_CXX_SUPPORTS_2D_CONST_CAST
117 const_cast<int(*)[3]>(ranges),
118 #else
119 (int(*)[3]) ranges,
120 #endif
121 &newgroup);
122 return newgroup;
123 }
124
125 inline void
126 MPI::Group::Free()
127 {
128 (void)MPI_Group_free(&mpi_group);
129 }