Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5D_FILL

Fills dataspace elements with a fill value in a memory buffer

Procedure:

H5D_FILL(fill, fill_type_id, buf, buf_type_id, space_id)

Signature:

herr_t H5Dfill
(
    const void  *fill,
    hid_t        fill_type_id,
    void        *buf,
    hid_t        buf_type_id,
    hid_t        space_id
)

SUBROUTINE h5dfill_f(fill_value, space_id, buf, hdferr)
  IMPLICIT NONE
  TYPE, INTENET(IN) :: fill_value        ! Fill value; may be have one of the
                                         ! following types:
                                         ! INTEGER, REAL, DOUBLE PRECISION, 
                                         ! CHARACTER
  INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier 
  TYPE, DIMENSION(*) :: buf              ! Memory buffer to fill in; must have
                                         ! the same datatype as fill value
  INTEGER, INTENT(OUT) :: hdferr         ! Error code  
                                         ! 0 on success and -1 on failure
END SUBROUTINE h5dfill_f

Parameters:
const void *fillIN: Pointer to the fill value to be used
hid_t fill_type_id    IN: Fill value datatype identifier
void *bufIN/OUT: Pointer to the memory buffer containing the selection to be filled
hid_t buf_type_idIN: Datatype of dataspace elements to be filled
hid_t space_idIN: Dataspace describing memory buffer and containing the selection to be filled

Description:

H5D_FILL explicitly fills the dataspace selection in memory, space_id, with the fill value specified in fill. If fill is NULL, a fill value of 0 (zero) is used.

fill_type_id specifies the datatype of the fill value.

buf specifies the buffer in which the dataspace elements will be written.

buf_type_id specifies the datatype of those data elements.

Note that if the fill value datatype differs from the memory buffer datatype, the fill value will be converted to the memory buffer datatype before filling the selection.

Applications sometimes write data only to portions of an allocated dataset. It is often useful in such cases to fill the unused space with a known fill value. See the following function for more information:

Other related functions include:

  • Page:
    H5P_SET_FILL_TIME — Sets the time when fill values are written to a dataset

  • Page:
    H5P_GET_FILL_TIME — Retrieves the time when fill value are written to a dataset

  • Page:
    H5D_CREATE — Creates a new dataset and links it to a location in the file

  • Page:
    H5D_CREATE_ANON — Creates a dataset in a file without linking it into the file structure

Returns:

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

Example:

Coming Soon!

--- Last Modified: April 10, 2018 | 03:47 PM