Page tree

The license could not be verified: License Certificate has expired!

 

JAVA

FORTRAN

C++

C

 

Link

H5T_SET_SIZE

Sets the total size for a datatype.

Procedure:

H5T_SET_SIZE(dtype_id, size)

Signature:

herr_t H5Tset_size( hid_t dtype_id, size_tsize )

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

Parameters:
hid_t dtype_id    IN: Identifier of datatype for which the size is being changed
size_t sizeIN: New datatype size in bytes or H5T_VARIABLE

Description:

H5Tset_size sets the total size in bytes, size, for a datatype.

The parameter size must have a positive value, unless it is passed as H5T_VARIABLE and the datatype is a string datatype.

Numeric datatypes: If the datatype is atomic and the size is decreased so that significant bits of the datatype extend beyond the edge of the new size, then the offset property of the datatype is decreased toward zero. If the offset becomes zero and the significant bits of the datatype still hang over the edge of the new size, then the number of significant bits is decreased.

String or character datatypes: The size set for a string datatype should include space for the null-terminator character, otherwise it will not be stored on (or retrieved from) disk. Adjusting the size of a string automatically sets the precision to 8*size.

Variable-length string datatypes: If dtype_id is a variable-length string, size must normally be set to H5T_VARIABLE. See “Creating variable-length string datatypes”.

Compound datatypes: This function may be used to increase or decrease the size of a compound datatype, but the function will fail if the new size is too small to accommodate all member fields.

Ineligible datatypes: This function cannot be used with enumerated datatypes (H5T_ENUM), array datatypes (H5T_ARRAY), variable-length array datatypes (H5T_VLEN), or reference datatypes (H5T_REFERENCE).

Returns:

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

Example:

Coming Soon!

--- Last Modified: January 24, 2018 | 11:01 AM