MPI-packable struct for an MPI-packable type plus its object id. More...
#include <id_pair.h>
Public Types | |
typedef std::vector< id_pair< T > > | vector |
Template typedef for declaring vectors of id_pair<T> | |
Public Member Functions | |
id_pair () | |
id_pair (const T &elt, size_t _id) | |
int | packed_size (MPI_Comm comm) const |
void | pack (void *buf, int bufsize, int *position, MPI_Comm comm) const |
Static Public Member Functions | |
static id_pair | unpack (void *buf, int bufsize, int *position, MPI_Comm comm) |
Public Attributes | |
T | element |
The object wrapped by this id_pair. | |
size_t | id |
Id of the rank where element came from. |
MPI-packable struct for an MPI-packable type plus its object id.
Each id_pair<T> has an element and an id for that element and supports packed_size(), pack(), and unpack() methods for transferring these things with MPI.
T | Type of contained element. T Must support MPI pack(), packed_size(), and unpack() methods. |
Definition at line 55 of file id_pair.h.
void pack | ( | void * | buf, |
int | bufsize, | ||
int * | position, | ||
MPI_Comm | comm | ||
) | const [inline] |
static id_pair unpack | ( | void * | buf, |
int | bufsize, | ||
int * | position, | ||
MPI_Comm | comm | ||
) | [inline, static] |