H5P_SET_APPEND_FLUSH sets the following two actions to perform for a dataset associated with the dataset access property list
- Call the callback function
func set in the property list
- Flush the dataset associated with the dataset access property list
When a user is appending data to a dataset via H5DO_APPEND and the dataset’s newly extended dimension size hits a specified boundary, the library will first perform action #1 listed above. Upon return from the callback function, the library will then perform the above action #2 and return to the user. If no boundary is hit or set, the two actions above are not invoked.
The specified boundary is indicated by the parameter
boundary. It is a 1-dimensional array with
ndims elements, which should be the same as the rank of the dataset’s dataspace. While appending to a dataset along a particular dimension index via H5DO_APPEND, the library determines a boundary is reached when the resulting dimension size is divisible by
boundary[index]. A zero value for
boundary[index] indicates no boundary is set for that dimension index.
The setting of this property will apply only for a chunked dataset with an extendible dataspace. A dataspace is extendible when it is defined with either one of the following:
- A dataspace with fixed current and maximum dimension sizes
- A dataspace with at least one unlimited dimension for its maximum dimension size
When creating or opening a chunked dataset, the library will check whether the boundary as specified in the access property list is set up properly. The library will fail the dataset create or open if the following conditions are true:
ndims, the number of elements for
boundary, is not the same as the rank of the dataset’s dataspace.
- A non-zero boundary value is specified for a non-extendible dimension.
The callback function
func must conform to the following prototype:
typedef herr_t (H5D_append_cb_t)(hid_t dataset_id, hsize_t *cur_dims, void *user_data)
The parameters of the callback function, per the above prototype, are defined as follows:
dataset_id is the dataset identifier.
cur_dims is the dataset’s current dimension sizes when a boundary is hit.
user_data is the user-defined input data.