78. Duplicating a Datatype


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

MPI_TYPE_DUP(type, newtype)
IN typedatatype (handle)
OUT newtypecopy of type (handle)

int MPI_Type_dup(MPI_Datatype type, MPI_Datatype *newtype)

MPI_TYPE_DUP(TYPE, NEWTYPE, IERROR)
INTEGER TYPE, NEWTYPE, IERROR

{ MPI::Datatype MPI::Datatype::Dup() const (binding deprecated, see Section Deprecated since MPI-2.2 ) }

MPI_TYPE_DUP is a type constructor which duplicates the existing type 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 type and any copied cached information, see Section Datatypes on page 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 type.



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


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