H5LTread_bitfield_value(
hid_t dset_id,
int num_values,
const unsigned *offsets,
const unsigned *lengths,
hid_t space,
int *buf
)
H5LTread_bitfield_value
reads selected elements from a dataset specified by its
identifier dset_id, and unpacks the bit-field
values to a buffer buf.
The parameter space is a space identifier that
indicates which elements of the dataset should be read.
The parameter offsets is an array of length
num_values;
the ith element of the
array holds the value of the starting bit of the
ith bit-field value.
The parameter lengths is an array of length
num_flags;
the ith element of the array
holds the number of bits to be extracted for the
ith bit-field value.
Extracted bits will be interpreted as a base-2 integer value.
Each value will be converted to the base-10 integer value and
stored in the application buffer. Buffer buf
is allocated by the application and should be big enough
to hold num_sel_elem * num_values elements
of the specified type, where num_sel_elem
is a number of the elements to be read from the dataset.
Data in the buffer is organized as num_values
values for the first element, followed by the
num_values values for the second element,
... , followed by the num_values values for the
num_selected_elemth
element.
hid_t dset_id
| IN: Identifier of the dataset with bit-field values | |
int num_values
| IN: Number of the values to be extracted | |
const unsigned *offsets
| IN: Array of staring bits to be extracted from the
element
Valid values: 0 (zero) through 7
| |
const unsigned *lengths
| IN: Array of the number of bits to be extracted for each value | |
hid_t space
| IN: Dataspace identifier, describing the elements to be read from the dataset with bit-field values | |
int *buf | OUT: Buffer to read the values in |
SUBROUTINE H5LTread_bitfield_value_f(dset_id, num_values, offset, &
lengths, space, buf, dims, error)
IMPLICIT NONE
INTEGER(hid_t), INTENT(IN) :: dset_id ! Identifier of the dataset with bit-field values
INTEGER, INTENT(IN) :: num_values ! Number of the values to be extracted
INTEGER, DIMENSION(*), INTENT(IN) :: offset ! Array of staring bits to be extracted from the element
! valid values: 1 through 8
INTEGER, DIMENSION(*), INTENT(IN) :: lengths ! Array of the number of bits to be extracted for each value
INTEGER, DIMENSION(:), INTENT(IN) :: dims ! Dimension of the reading buffer, buf
INTEGER(hid_t), INTENT(IN) :: space ! Dataspace identifier, describing the elements to be read from the dataset
! with bit-field values
INTEGER, DIMENSION(*), INTENT(OUT) :: buf ! Buffer to read the values in, buf has dimensions dims
INTEGER, INTENT(OUT) :: error ! Error code:
! 0 on success and -1 on failure
END SUBROUTINE H5LTread_bitfield_value_f
| Release | Change |
| 1.0 | C function introduced in this release. |
| 1.1 | Fortran wrapper introduced in this release. |