Change array element datatype¶
ss_array_target
is a function defined in ssarray.c.
Synopsis:
-
herr_t
ss_array_target
(ss_array_t *array, hid_t ftype)¶
Formal Arguments:
array
: Array whose datatype is to be modified.ftype
: Datatype of the array elements as stored in the file.
Description: Every array has two datatypes associated with it: a datatype for the elements as they are stored in the file,
and a datatype of the elements as they exist in memory with the ss_array_put and ss_array_get functions.
When a new array is created the memory datatype is the HDF5 equivalent of ss_pers_t
(a persistent object link)
and the file datatype is its counterpart, ss_pers_tf
. This function sets the file datatype to the specified
value and clears the memory buffer and associated memory datatype.
Return Value: Returns non-negative on success; negative on failure. It is an error to modify the file datatype if the array size is positive.
Parallel Notes: Independent
See Also:
- ss_array_get: 10.4: Obtain array value
- ss_array_put: 10.5: Modify part of an array
- Variable Length Arrays: Introduction for current chapter