Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5T_GET_SIZE

Returns the size of a datatype

Procedure:

H5T_GET_SIZE (dtype_id)

Signature:

size_t H5Tget_size( hid_t dtype_id )

SUBROUTINE h5tget_size_f(type_id, size, hdferr) 
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier 
  INTEGER(SIZE_T), INTENT(OUT) :: size  ! Datatype size
  INTEGER, INTENT(OUT) :: hdferr        ! Error code
                                        ! 0 on success and -1 on failure
END SUBROUTINE h5tget_size_f

Parameters:
hid_t dtype_id    IN: Identifier of datatype to query

Description:

 H5T_GET_SIZE returns the size of a datatype in bytes.

For atomic datatypes, array datatypes, compound datatypes, and other datatypes of a constant size, the returned value is the size of the actual datatype in bytes.

For variable-length string datatypes (see Creating variable-length string datatypes), the returned value is the size of the pointer to the actual string, or sizeof(char *). This function does not return the size of actual variable-length string data.

For variable-length sequence datatypes (see H5T_VLEN_CREATE), the returned value is the size of the hvl_t struct, or sizeof(hvl_t). The hvl_t struct contains a pointer to the actual data and a size value. This function does not return the size of actual variable-length sequence data.

Returns:

Returns the size of the datatype in bytes if successful; otherwise 0.

Example:

Coming Soon!

--- Last Modified: May 17, 2019 | 03:20 PM