The following function replaces the three functions MPI_TYPE_UB, MPI_TYPE_LB and MPI_TYPE_EXTENT. It also returns address sized integers, in the Fortran binding. The use of MPI_TYPE_UB, MPI_TYPE_LB and MPI_TYPE_EXTENT is deprecated.
MPI_TYPE_GET_EXTENT(datatype, lb, extent)
int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
MPI_TYPE_GET_EXTENT(DATATYPE, LB, EXTENT, IERROR)INTEGER DATATYPE, IERROR
INTEGER(KIND = MPI_ADDRESS_KIND) LB, EXTENT
int MPI::Datatype::Get_extent(MPI::Aint& lb, MPI::Aint& extent) const
void
Returns the lower bound and the extent of datatype (as defined by the MPI-/ standard, Section 3.12.2).
MPI-/ allows one to change the extent of a datatype, using lower bound and upper bound markers (MPI_LB and MPI_UB). This is useful, as it allows to control the stride of successive datatypes that are replicated by datatype constructors, or are replicated by the count argument in a send or recieve call. However, the current mechanism for achieving it is painful; also it is restrictive. MPI_LB and MPI_UB are ``sticky'': once present in a datatype, they cannot be overridden (e.g., the upper bound can be moved up, by adding a new MPI_UB marker, but cannot be moved down below an existing MPI_UB marker). A new type constructor is provided to facilitate these changes. The use of MPI_LB and MPI_UB is deprecated.
MPI_TYPE_CREATE_RESIZED(oldtype, lb, extent, newtype)
int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype)
MPI_TYPE_CREATE_RESIZED(OLDTYPE, LB, EXTENT, NEWTYPE, IERROR)INTEGER OLDTYPE, NEWTYPE, IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) LB, EXTENT
int MPI::Datatype::Resized(const MPI::Aint lb, const MPI::Aint extent) const
MPI::Datatype
Returns in newtype a handle to a new datatype that is
identical to oldtype, except that the lower bound of this new
datatype is set to be lb, and its upper bound is set to be
lb extent.
Any previous lb and ub markers are erased,
and a new pair of lower bound and upper bound markers are put in the
positions indicated by the lb and extent arguments.
This affects the behavior of the datatype when used in communication
operations, with count
, and when used in the
construction of new derived datatypes.
MPI-Standard for MARMOT