KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
RankRanges encapsulate multiple rank ranges which are used in functions like MPI_Group_range_incl/excl
.
More...
#include <rank_ranges.hpp>
Public Member Functions | |
RankRanges (int(*rank_range_array)[3], size_t size) | |
Constructor taking a plain two dimension c-style array. | |
template<typename RangeContainer > | |
RankRanges (RangeContainer const &ranges) | |
Constructor taking any container storing RankRange objects. | |
~RankRanges () | |
Destroys objects and deallocates any memory allocated during construction. | |
auto | get () const |
Get non-owning access to the underlying c-style array storing the rank ranges. | |
auto | size () const |
Number of ranges stored in this object. | |
bool | contains (int rank) const |
Checks whether the rank ranges contain a certain rank. | |
RankRanges encapsulate multiple rank ranges which are used in functions like MPI_Group_range_incl/excl
.
MPI_Group_range_incl/excl
use multidimensional integer arrays to represent rank ranges. One can therefore use plain c-style multi dimensional arrays directly which results in a zero-cost abstraction or use any container type storing RankRange
object which are then converted to the required plain c-style array.
Constructor taking a plain two dimension c-style array.
rank_range_array | Pointer to int[3] representing contiguously stored plain MPI rank ranges. |
size | Number of ranges stored in this array. |
|
inline |
Checks whether the rank ranges contain a certain rank.
|
inline |
Get non-owning access to the underlying c-style array storing the rank ranges.
|
inline |
Number of ranges stored in this object.