Modify attribute type and size

ss_attr_modify is a function defined in ssattr.c.

Synopsis:

herr_t ss_attr_modify(ss_attr_t *attr, hid_t type, size_t nelmts, unsigned flags)

Formal Arguments:

  • attr: The attribute whose size will be changed.
  • type: The new datatype for the attribute, or H5I_INVALID_HID if the type is not to be changed. If the datatype is changed but is conversion compatible with the previous type then the attribute’s data will be converted to the new datatype. Otherwise the attribute’s data will be initialized to all zero.
  • nelmts: The new number of elements in the attribute value, or SS_NOSIZE if the number of elements is not to be changed. If the number of elements decreases then the extra elements are discarded. If the number of elements increases then the new elements will be initialized to all zero bytes.
  • flags: Bit flags such as SS_ALLSAME.

Description: This function modifies the storage datatype and/or number of elements of an attribute.

Return Value: Returns non-negative on success; negative on failure.

Parallel Notes: Independent. However if the SS_ALLSAME bit is set in the flags argument then this function is collective across the communicator of the scope that owns the attribute and all tasks must pass identical values for the type and nelmts.

See Also: