if (H5T_COMPOUND==dt->shared->type || H5T_REFERENCE==dt->shared->type || H5T_OPAQUE==dt->shared->type)
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
 * Module Info: This module contains the functionality for setting & querying
 *      the datatype offset for the H5T interface.
 */
#include "H5Tmodule.h"          /* This source code file is part of the H5T module */
#include "H5private.h"      /* Generic Functions            */
#include "H5Eprivate.h"     /* Error handling           */
#include "H5Iprivate.h"     /* IDs                  */
#include "H5Tpkg.h"     /* Datatypes                */
/* Static local functions */
static herr_t H5T_set_offset(const H5T_t *dt, size_t offset);
/*-------------------------------------------------------------------------
 * Function:    H5Tget_offset
 *
 * Purpose: Retrieves the bit offset of the first significant bit.  The
 *      signficant 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 layed out in memory as (from
 *      small byte address toward larger byte addresses):
 *
 *          Big      Big       Little   Little
 *          Endian   Endian    Endian   Endian
 *          offset=0 offset=16 offset=0 offset=16
 *
 *      0:  [ pad]   [0x11]    [0x22]   [ pad]
 *      1:  [ pad]   [0x22]    [0x11]   [ pad]