Change an attribute value¶
ss_attr_put is a function defined in ssattr.c.
Synopsis:
-
herr_t
ss_attr_put(ss_attr_t *attr, hid_t type, size_t offset, size_t nelmts, const void *value, unsigned flags)¶
Formal Arguments:
attr: The attribute in question.type: The datatype ofvalue.offset: The element number at which to putvalue.nelmts: The number of elements invalue.value: The value to be written to the attribute.flags: Flags such as SS_ALLSAME.
Description: An attribute’s value can be changed by calling this function. If the attribute stores more than one value then
the supplied new value can be for either the whole attribute or for just part of the attribute as determined
by the offset and nelmts arguments. The datatype of each element of value is specified by type and must be
conversion compatible with the datatype already registered with the attribute.
Return Value: Returns non-negative on success; negative on failure. It is an error if offset and nelmts specify a range of
elements ouside that which the attribute already knows about.
Parallel Notes: Independent. However, if the SS_ALLSAME bit is passed in the flags argument the call should be collective
across all tasks of the communicator for the scope that owns the attribute and all such tasks must pass
identical values for offset and nelmts and a type and value such that the converted value is identical on all
tasks.
See Also:
- Object Attributes: Introduction for current chapter