COMBINATORIAL_BLAS  1.6
dtypes.h File Reference

Traits to determine MPI_DATATYPE from a C++ datatype. More...

#include <mpi.h>
#include <complex>

Go to the source code of this file.

Classes

class  par::Mpi_datatype< T >
 An abstract class used for communicating messages using user-defined datatypes. The user must implement the static member function "value()" that returns the MPI_Datatype corresponding to this user-defined datatype. More...
 
class  par::Mpi_pairtype< T1, T2 >
 
class  par::Mpi_datatype< std::complex< T > >
 
class  par::Mpi_pairtype< T1, T2 >
 
class  par::Mpi_datatype< bool >
 A template specialization of the abstract class Mpi_datatype. This can be used for communicating messages of type "bool". More...
 

Namespaces

 par
 Collection of Generic Parallel Functions: Sorting, Partitioning, Searching,...
 

Macros

#define HS_MPIDATATYPE(CTYPE, MPITYPE)
 
#define HS_MPIPAIRDATATYPE(CTYPE1, CTYPE2, MPITYPE)
 

Detailed Description

Traits to determine MPI_DATATYPE from a C++ datatype.

Author
Hari Sundar, hsund.nosp@m.ar@g.nosp@m.mail..nosp@m.com

Traits to determine MPI_DATATYPE from a C++ datatype. For non standard C++ datatypes (like classes), we will need to define additional classes. An example is given for the case of the std. complex variable. Additional classes can be added as required.

Definition in file dtypes.h.

Macro Definition Documentation

◆ HS_MPIDATATYPE

#define HS_MPIDATATYPE (   CTYPE,
  MPITYPE 
)
Value:
template <> \
class Mpi_datatype<CTYPE> \
{ \
public: \
static MPI_Datatype value() {\
return MPITYPE;\
} \
};

Definition at line 34 of file dtypes.h.

◆ HS_MPIPAIRDATATYPE

#define HS_MPIPAIRDATATYPE (   CTYPE1,
  CTYPE2,
  MPITYPE 
)
Value:
template <> \
class Mpi_pairtype<CTYPE1, CTYPE2> \
{ \
public: \
static MPI_Datatype value() {\
return MPITYPE;\
} \
};

Definition at line 62 of file dtypes.h.