MPI_TYPE_STRUCT(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) IN count number of blocks IN array_of_blocklengths number of elements per block IN array_of_displacements byte displacement for each block IN oldtype type of elements in each block OUT newtype new datatype
MPI_Type_struct(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype)
MPI_TYPE_STRUCT(COUNT, ARRAY_OF_BLOCKLENGTHS, ARRAY_OF_DISPLACEMENTS, ARRAY_OF_TYPES, NEWTYPE, IERROR)INTEGER COUNT, ARRAY_OF_BLOCKLENGTHS(*), ARRAY_OF_DISPLACEMENTS(*), ARRAY_OF_TYPES(*), NEWTYPE, IERROR
MPI_TYPE_STRUCT is the most general type constructor.
It further generalizes MPI_TYPE_HINDEXED
in that it allows each block to consist of replications of
different datatypes.
The intent is to allow descriptions of arrays of structures, as a single
datatype.
The action of the Struct
constructor is represented schematically in
Figure .