H5P_SET_FAPL_DIRECT sets the file access property list, fapl_id, to use the direct I/O driver, H5FD_DIRECT. With this driver, data is written to or read from the file synchronously without being cached by the system.
File systems usually require the data address in memory, the file address, and the size of the data to be aligned. The HDF5 Library’s direct I/O driver is able to handle unaligned data, though that will consume some additional memory resources and may slow performance. To get better performance, use the system function posix_memalign to align the data buffer in memory and the HDF5 function H5P_SET_ALIGNMENT to align the data in the file. Be aware, however, that aligned data I/O may cause the HDF5 file to be bigger than the actual data size would otherwise require because the alignment may leave some holes in the file.
alignment specifies the required alignment boundary in memory.
block_size specifies the file system block size. A value of 0 (zero) means to use HDF5 Library’s default value of 4KB.
cbuf_size specifies the copy buffer size.
Returns a non-negative value if successful; otherwise returns a negative value.