6.1.7. Extent and Bounds of Datatypes
Up: Derived Datatypes
Next: True Extent of Datatypes
Previous: Lower-Bound and Upper-Bound Markers
MPI_TYPE_GET_EXTENT(datatype, lb, extent) |
IN datatype | datatype to get information on (handle) |
OUT lb | lower bound of datatype (integer) |
OUT extent | extent of datatype (integer) |
C binding
int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
int MPI_Type_get_extent_c(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent)
Fortran 2008 binding
MPI_Type_get_extent(datatype, lb, extent, ierror)
TYPE(MPI_Datatype), INTENT(IN) :: datatype
INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(OUT) :: lb, extent
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_Type_get_extent(datatype, lb, extent, ierror) !(_c)
TYPE(MPI_Datatype), INTENT(IN) :: datatype
INTEGER(KIND=MPI_COUNT_KIND), INTENT(OUT) :: lb, extent
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_TYPE_GET_EXTENT(DATATYPE, LB, EXTENT, IERROR)
INTEGER DATATYPE, IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) LB, EXTENT
Returns the lower bound and the extent of
datatype
(as defined in Equation 1).
If either OUT parameter cannot express the value
to be returned (e.g., if the parameter is too small to hold the output
value), it is set to MPI_UNDEFINED.
MPI allows one to change the extent of a datatype, using lower bound
and upper bound markers. This provides control over the stride of successive
datatypes that are replicated by datatype constructors, or are
replicated by the count argument in a send or receive
call.
MPI_TYPE_CREATE_RESIZED(oldtype, lb, extent, newtype) |
IN oldtype | input datatype (handle) |
IN lb | new lower bound of datatype (integer) |
IN extent | new extent of datatype (integer) |
OUT newtype | output datatype (handle) |
C binding
int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype)
int MPI_Type_create_resized_c(MPI_Datatype oldtype, MPI_Count lb, MPI_Count extent, MPI_Datatype *newtype)
Fortran 2008 binding
MPI_Type_create_resized(oldtype, lb, extent, newtype, ierror)
TYPE(MPI_Datatype), INTENT(IN) :: oldtype
INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: lb, extent
TYPE(MPI_Datatype), INTENT(OUT) :: newtype
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_Type_create_resized(oldtype, lb, extent, newtype, ierror) !(_c)
TYPE(MPI_Datatype), INTENT(IN) :: oldtype
INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: lb, extent
TYPE(MPI_Datatype), INTENT(OUT) :: newtype
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_TYPE_CREATE_RESIZED(OLDTYPE, LB, EXTENT, NEWTYPE, IERROR)
INTEGER OLDTYPE, NEWTYPE, IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) LB, EXTENT
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 >1, and when used in the
construction of new derived datatypes.
Up: Derived Datatypes
Next: True Extent of Datatypes
Previous: Lower-Bound and Upper-Bound Markers
Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023