Custom MPI utilities.
More...
#include <mympi.h>
List of all members.
Public Member Functions |
| MyMPI () |
| Constructor, initialize WAIT time.
|
| ~MyMPI () |
| Destructor.
|
bool | isPowerOfTwo (const int n) |
| If n is power of two return true.
|
void | splitRange (int &begin, int &end, int iSplit, int numSplit) |
| Split range and return partial range.
|
template<typename T > |
MPI_Datatype | getType (T object) |
| Get MPI data type.
|
template<typename T > |
void | print (T data) |
| Print a scalar value on all ranks.
|
template<typename T > |
void | print (T data, const int irank) |
| Print a scalar value on irank.
|
template<typename T > |
void | print (T *data, const int begin, const int end) |
| Print a vector value on all ranks.
|
template<typename T > |
void | print (T *data, const int begin, const int end, const int irank) |
| Print a vector value on irank.
|
Protected Attributes |
const int | WAIT |
| Waiting time between output of different ranks.
|
int | MPISIZES |
| Number of MPI processes for split communicator.
|
int | MPIRANKS |
| Rank of current MPI process for split communicator.
|
Detailed Description
Custom MPI utilities.
Definition at line 29 of file mympi.h.
Constructor & Destructor Documentation
MyMPI::MyMPI |
( |
| ) |
[inline] |
Constructor, initialize WAIT time.
Definition at line 36 of file mympi.h.
MyMPI::~MyMPI |
( |
| ) |
[inline] |
Destructor.
Definition at line 48 of file mympi.h.
Member Function Documentation
template<typename T >
MPI_Datatype MyMPI::getType |
( |
T |
object | ) |
[inline] |
Get MPI data type.
Definition at line 71 of file mympi.h.
bool MyMPI::isPowerOfTwo |
( |
const int |
n | ) |
[inline] |
If n is power of two return true.
Definition at line 55 of file mympi.h.
template<typename T >
void MyMPI::print |
( |
T * |
data, |
|
|
const int |
begin, |
|
|
const int |
end |
|
) |
| [inline] |
Print a vector value on all ranks.
Definition at line 130 of file mympi.h.
template<typename T >
void MyMPI::print |
( |
T |
data, |
|
|
const int |
irank |
|
) |
| [inline] |
Print a scalar value on irank.
Definition at line 122 of file mympi.h.
template<typename T >
void MyMPI::print |
( |
T |
data | ) |
[inline] |
Print a scalar value on all ranks.
Definition at line 109 of file mympi.h.
template<typename T >
void MyMPI::print |
( |
T * |
data, |
|
|
const int |
begin, |
|
|
const int |
end, |
|
|
const int |
irank |
|
) |
| [inline] |
Print a vector value on irank.
Definition at line 146 of file mympi.h.
void MyMPI::splitRange |
( |
int & |
begin, |
|
|
int & |
end, |
|
|
int |
iSplit, |
|
|
int |
numSplit |
|
) |
| [inline] |
Split range and return partial range.
Definition at line 60 of file mympi.h.
Member Data Documentation
Rank of current MPI process for split communicator.
Definition at line 33 of file mympi.h.
Number of MPI processes for split communicator.
Definition at line 32 of file mympi.h.
Waiting time between output of different ranks.
Definition at line 31 of file mympi.h.
The documentation for this class was generated from the following file: