82. Duplicating a Datatype

PreviousUpNext
Up: Derived Datatypes Next: Use of General Datatypes in Communication Previous: Commit and Free

MPI_TYPE_DUP(oldtype, newtype)
IN oldtypedatatype (handle)
OUT newtypecopy of oldtype (handle)

int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)

MPI_Type_dup(oldtype, newtype, ierror)
TYPE(MPI_Datatype), INTENT(IN) :: oldtype
TYPE(MPI_Datatype), INTENT(OUT) :: newtype
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_TYPE_DUP(OLDTYPE, NEWTYPE, IERROR)
INTEGER OLDTYPE, NEWTYPE, IERROR

MPI_TYPE_DUP is a type constructor which duplicates the existing oldtype with associated key values. For each key value, the respective copy callback function determines the attribute value associated with this key in the new communicator; one particular action that a copy callback may take is to delete the attribute from the new datatype. Returns in newtype a new datatype with exactly the same properties as oldtype and any copied cached information, see Section Datatypes . The new datatype has identical upper bound and lower bound and yields the same net result when fully decoded with the functions in Section Decoding a Datatype . The newtype has the same committed state as the old oldtype.


PreviousUpNext
Up: Derived Datatypes Next: Use of General Datatypes in Communication Previous: Commit and Free


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

(Unofficial) MPI-3.1 of June 4, 2015
HTML Generated on June 4, 2015