Datatype
-
template<typename T>
MPI_Datatype mpicpp_lite::register_mpi_datatype() Register a new datatype for MPI communication.
- Template Parameters:
T – Datatype to register
- Returns:
New MPI datatype
-
template<typename T>
inline MPI_Datatype mpicpp_lite::mpi_datatype() General template to obtain an MPI_Datatype from a C++ type.
- Template Parameters:
T – C++ data type
- Returns:
MPI_Datatypethat is used in the MPI API
-
inline MPI_Datatype mpicpp_lite::type_create_struct(const std::vector<MPI_Datatype> &types, const std::vector<int> &blk_lens, const std::vector<MPI_Aint> &offsets)
Create a new datatype for MPI communication.
- Parameters:
types – MPI datatypes
blk_lens – Number of elements of each type
offsets – Byte offsets of each element
- Returns:
New MPI datatype
-
inline MPI_Datatype mpicpp_lite::type_contiguous(int count, MPI_Datatype type)
Creates a contiguous datatype.
- Parameters:
count – Replication count (nonnegative integer)
type – Datatype (handle)
- Returns:
New MPI datatype
-
template<typename T>
inline int mpicpp_lite::type_size() Return the number of bytes occupied by entries in the datatype.
- Template Parameters:
T – Datatype
- Returns:
Number of bytes