Page tree









Sets type conversion and background buffers


H5P_SET_BUFFER ( plist, size, tconv, bkg )


herr_t H5Pset_buffer(hid_t plist,
        hsize_t size,
        void *tconv,
        void *bkg

Fortran90 Interface: h5pset_buffer_f
SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) 
  INTEGER(HID_T), INTENT(IN)   :: plist_id ! Dataset transfer property 
                                           ! list identifier
  INTEGER(HSIZE_T), INTENT(IN) :: size     ! Conversion buffer size
  INTEGER, INTENT(OUT)         :: hdferr   ! Error code
                                           ! 0 on success and -1 on failure
END SUBROUTINE h5pset_buffer_f

hid_t plistIN: Identifier for the dataset transfer property list
hsize_t size    IN: Size, in bytes, of the type conversion and background buffers
void tconvIN: Pointer to application-allocated type conversion buffer
void bkgIN: Pointer to application-allocated background buffer


Given a dataset transfer property list, H5P_SET_BUFFER sets the maximum size for the type conversion buffer and background buffer and optionally supplies pointers to application-allocated buffers. If the buffer size is smaller than the entire amount of data being transferred between the application and the file, and a type conversion buffer or background buffer is required, then strip mining will be used.

Note that there are minimum size requirements for the buffer. Strip mining can only break the data up along the first dimension, so the buffer must be large enough to accommodate a complete slice that encompasses all of the remaining dimensions. For example, when strip mining a 100x200x300 hyperslab of a simple data space, the buffer must be large enough to hold 1x200x300 data elements. When strip mining a 100x200x300x150 hyperslab of a simple data space, the buffer must be large enough to hold 1x200x300x150 data elements.

If tconv and/or bkg are null pointers, then buffers will be allocated and freed during the data transfer.

The default value for the maximum buffer is 1 Mb.


Returns a non-negative value if successful; otherwise returns a negative value.


Release    Change
1.6.0The size parameter has changed from type hsize_t to size_t.
1.4.0The size parameter has changed to type hsize_t.

--- Last Modified: August 09, 2019 | 01:21 PM