306. C++ Datatypes


Up: C++ Next: Communicators Previous: Semantics

Table 11 lists all of the C++ predefined MPI datatypes and their corresponding C and C++ datatypes, Table 12 lists all of the Fortran predefined MPI datatypes and their corresponding Fortran 77 datatypes. Table 13 lists the C++ names for all other MPI datatypes.

MPI::BYTE and MPI::PACKED conform to the same restrictions as MPI_BYTE and MPI_PACKED, listed in Sections Message Data on page Message Data and Sections Pack and Unpack on page Pack and Unpack , respectively.

MPI datatype C datatype C++ datatype
MPI::CHAR char char
MPI::SHORT signed short signed short
MPI::INT signed int signed int
MPI::LONG signed long signed long
MPI::LONG_LONG signed long long signed long long
MPI::SIGNED_CHAR signed char signed char
MPI::UNSIGNED_CHAR unsigned char unsigned char
MPI::UNSIGNED_SHORT unsigned short unsigned short
MPI::UNSIGNED unsigned int unsigned int
MPI::UNSIGNED_LONG unsigned long unsigned long int
MPI::UNSIGNED_LONG_LONG unsigned long long unsigned long long
MPI::FLOAT float float
MPI::DOUBLE double double
MPI::LONG_DOUBLE long double long double
MPI::BOOL bool
MPI::COMPLEX Complex<float>
MPI::DOUBLE_COMPLEX Complex<double>
MPI::LONG_DOUBLE_COMPLEX Complex<long double>
MPI::WCHAR wchar_t wchar_t
MPI::BYTE
MPI::PACKED

Table 11: C++ names for the  MPI C and C++ predefined datatypes, and their corresponding C/C++ datatypes.

MPI datatype Fortran datatype
MPI::INTEGER INTEGER
MPI::REAL REAL
MPI::DOUBLE_PRECISION DOUBLE PRECISION
MPI::F_COMPLEX COMPLEX
MPI::LOGICAL LOGICAL
MPI::CHARACTER CHARACTER(1)
MPI::BYTE
MPI::PACKED

Table 12: C++ names for the  MPI Fortran predefined datatypes, and their corresponding Fortran 77 datatypes.

MPI datatype Description
MPI::FLOAT_INT C/C++ reduction type
MPI::DOUBLE_INT C/C++ reduction type
MPI::LONG_INT C/C++ reduction type
MPI::TWOINT C/C++ reduction type
MPI::SHORT_INT C/C++ reduction type
MPI::LONG_DOUBLE_INT C/C++ reduction type
MPI::TWOREAL Fortran reduction type
MPI::TWODOUBLE_PRECISION Fortran reduction type
MPI::TWOINTEGER Fortran reduction type
MPI::F_DOUBLE_COMPLEX Optional Fortran type
MPI::INTEGER1 Explicit size type
MPI::INTEGER2 Explicit size type
MPI::INTEGER4 Explicit size type
MPI::INTEGER8 Explicit size type
MPI::INTEGER16 Explicit size type
MPI::REAL2 Explicit size type
MPI::REAL4 Explicit size type
MPI::REAL8 Explicit size type
MPI::REAL16 Explicit size type
MPI::F_COMPLEX4 Explicit size type
MPI::F_COMPLEX8 Explicit size type
MPI::F_COMPLEX16 Explicit size type
MPI::F_COMPLEX32 Explicit size type

Table 13: C++ names for other  MPI datatypes. Implementations may also define other optional types (e.g.,  MPI::INTEGER8).

The following table defines groups of MPI predefined datatypes:

Valid datatypes for each reduction operation are specified below in terms of the groups defined above.

MPI::MINLOC and MPI::MAXLOC perform just as their C and Fortran counterparts; see Section MINLOC and MAXLOC on page MINLOC and MAXLOC .



Up: C++ Next: Communicators Previous: Semantics


Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009