Last modified: 18 August 2010
Name: H5Tconvert
Signature:
herr_t H5Tconvert( hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t plist_id )

Purpose:
Converts data from between specified datatypes.

Description:
H5Tconvert converts nelmts elements from the type specified by the src_id identifier to type dst_id. The source elements are packed in buf and on return the destination will be packed in buf. That is, the conversion is performed in place. The optional background buffer is an array of nelmts values of destination type which are merged with the converted values to fill in cracks (for instance, background might be an array of structs with the a and b fields already initialized and the conversion of buf supplies the c and d field values).

The parameter plist_id contains the dataset transfer property list identifier which is passed to the conversion functions. As of Release 1.2, this parameter is only used to pass along the variable-length datatype custom allocation information.

Parameters:
hid_t src_id IN: Identifier for the source datatype.
hid_t dst_id IN: Identifier for the destination datatype.
size_t nelmts IN: Size of array buf.
void *buf IN/OUT: Array containing pre- and post-conversion values.
void *background     IN: Optional background buffer.
hid_t plist_id IN: Dataset transfer property list identifier.

Returns:
Returns a non-negative value if successful; otherwise returns a negative value.

Fortran90 Interface:
None.

History:
Release     C
1.6.3 nelmts parameter type changed to size_t.
1.4.0 nelmts parameter type changed to hsize_t.