Last modified: 17 July 2014
Name: H5Tget_size
Signature:
  size_t `H5Tget_size`( hid_t `dtype_id` )

Purpose:
  Returns the size of a datatype.

Description:
  `H5Tget_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 `H5Tvlen_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.

Parameters:

  hid_t `dtype_id` | IN: Identifier of datatype to query.

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

Fortran90 Interface: h5tget_size_f

      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