31 template <
typename T1,
typename T2>
34 #define HS_MPIDATATYPE(CTYPE, MPITYPE) \ 36 class Mpi_datatype<CTYPE> \ 39 static MPI_Datatype value() {\ 62 #define HS_MPIPAIRDATATYPE(CTYPE1, CTYPE2, MPITYPE) \ 64 class Mpi_pairtype<CTYPE1, CTYPE2> \ 67 static MPI_Datatype value() {\ 79 #undef HS_MPIPAIRDATATYPE 88 static bool first =
true;
89 static MPI_Datatype datatype;
94 MPI_Type_commit(&datatype);
101 template <
typename T1,
typename T2>
106 static bool first =
true;
107 static MPI_Datatype datatype;
113 MPI_Datatype type[2];
120 disp[1] =
sizeof(T1);
122 MPI_Type_create_struct(2, block, disp, type, &datatype);
123 MPI_Type_commit(&datatype);
136 static void bool_LOR(
void *in,
void *inout,
int* len, MPI_Datatype * dptr) {
137 for (
int i = 0; i < (*len); i++) {
138 ((
static_cast<bool*
>(inout))[i]) =
139 ( ((static_cast<bool*>(in))[i]) ||
140 ((
static_cast<bool*
>(inout))[i]) );
145 static void bool_LAND(
void *in,
void *inout,
int* len, MPI_Datatype * dptr) {
146 for (
int i = 0; i < (*len); i++) {
147 ((
static_cast<bool*
>(inout))[i]) =
148 ( ((static_cast<bool*>(in))[i]) && ((
static_cast<bool*
>(inout))[i]));
158 static bool first =
true;
173 static bool first =
true;
187 static bool first =
true;
188 static MPI_Datatype datatype;
191 MPI_Type_contiguous(
sizeof(
bool), MPI_BYTE, &datatype);
192 MPI_Type_commit(&datatype);
An abstract class used for communicating messages using user-defined datatypes. The user must impleme...
static MPI_Datatype value()
static MPI_Datatype value()
static MPI_Op LAND()
User defined MPI_Operation to perform: second[i] = (first[i] && second[i]),.
static MPI_Op LOR()
User defined MPI_Operation to perform: second[i] = (first[i] || second[i]),.
#define HS_MPIPAIRDATATYPE(CTYPE1, CTYPE2, MPITYPE)
Collection of Generic Parallel Functions: Sorting, Partitioning, Searching,...
#define HS_MPIDATATYPE(CTYPE, MPITYPE)
static MPI_Datatype value()