Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5T_GET_OFFSET

Retrieves the bit offset of the first significant bit.

Procedure:

H5T_GET_OFFSET(dtype_id)

Signature:

int H5Tget_offset( hid_t dtype_id )

SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) 
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier 
  INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the
                                         ! first significant bit
  INTEGER, INTENT(OUT) :: hdferr         ! Error code
                                         ! 0 on success and -1 on failure
END SUBROUTINE h5tget_offset_f

Parameters:
hid_t dtype_id    IN: Identifier of datatype to query.

Description:

H5Tget_offset retrieves the bit offset of the first significant bit. The significant bits of an atomic datum can be offset from the beginning of the memory for that datum by an amount of padding. The `offset' property specifies the number of bits of padding that appear to the "right of" the value. That is, if we have a 32-bit datum with 16-bits of precision having the value 0x1122 then it will be laid out in memory as (from small byte address toward larger byte addresses): 

Byte PositionBig-Endian Offset=0Big-Endian Offset=16Little-Endian Offset=0Little-Endian Offset=16
0:[ pad][0x11][0x22][ pad]
1:[ pad][0x22][0x11][ pad]
2:[0x11][ pad][ pad][0x22]
3:[0x22][ pad][ pad][0x11]

Returns:

Returns an offset value if successful; otherwise returns a negative value.

Example:

Coming Soon!

--- Last Modified: December 04, 2017 | 06:59 AM