The H5DO_APPEND routine extends a dataset by num_elem number of elements along a dimension specified by a dimension index and writes buffer of elements to the dataset. Dimension index is 0-based. Elements’ type is described by memtype.
This routine combines calling H5Dset_extent, H5Sselect_hyperslab, and H5Dwrite into a single routine that simplifies application development for the common case of appending elements to an existing dataset.
For a multi-dimensional dataset, appending to one dimension will write a contiguous hyperslab over the other dimensions. For example, if a 3-D dataset has dimension sizes (3, 5, 8), extending the 0th dimension (currently of size 3) by 3 will append 3*5*8 = 120 elements (which must be pointed to by the buffer parameter) to the dataset, making its final dimension sizes (6, 5, 8).
If a dataset has more than one unlimited dimension, any of those dimensions may be appended to, although only along one dimension per call to H5DO_APPEND.
Returns a non-negative value if successful; otherwise returns a negative value.