/**************************************************************************** * NCSA HDF * * Software Development Group * * National Center for Supercomputing Applications * * University of Illinois at Urbana-Champaign * * 605 E. Springfield, Champaign IL 61820 * * * * For conditions of distribution and use, see the accompanying * * hdf/COPYING file. * * * ****************************************************************************/ /*----------------------------------------------------------------------------- * File: H5Iprivate.h * Purpose: header file for ID API *---------------------------------------------------------------------------*/ /* avoid re-inclusion */ #ifndef _H5Iprivate_H #define _H5Iprivate_H #include "H5Ipublic.h" /*include Public Definitions */ /* Private headers needed by this file */ #include "H5private.h" /* Default sizes of the hash-tables for various atom groups */ #define H5I_ERRSTACK_HASHSIZE 64 #define H5I_FILEID_HASHSIZE 64 #define H5I_TEMPID_HASHSIZE 64 #define H5I_DATATYPEID_HASHSIZE 64 #define H5I_DATASPACEID_HASHSIZE 64 #define H5I_DATASETID_HASHSIZE 64 #define H5I_OID_HASHSIZE 64 #define H5I_GROUPID_HASHSIZE 64 #define H5I_ATTRID_HASHSIZE 64 #define H5I_TEMPBUFID_HASHSIZE 64 #define H5I_REFID_HASHSIZE 64 #define H5I_VFL_HASHSIZE 64 #define H5I_GENPROPCLS_HASHSIZE 64 #define H5I_GENPROPOBJ_HASHSIZE 128 /* * Define the following macro for fast hash calculations (but limited * hash sizes) */ #define HASH_SIZE_POWER_2 /* Define the following macro for atom caching over all the atoms */ #define IDS_ARE_CACHED #ifdef IDS_ARE_CACHED # define ID_CACHE_SIZE 4 /*# of previous atoms cached */ #endif /* * Number of bits to use for Group ID in each atom. Increase if H5I_NGROUPS * becomes too large (an assertion would fail in H5I_init_interface). This is * the only number that must be changed since all other bit field sizes and * masks are calculated from GROUP_BITS. */ #define GROUP_BITS 5 #define GROUP_MASK ((1<>ID_BITS) & GROUP_MASK)) #ifdef HASH_SIZE_POWER_2 /* * Map an ID to a hash location (assumes s is a power of 2 and smaller * than the ID_MASK constant). */ # define H5I_LOC(a,s) ((hid_t)((size_t)(a)&((s)-1))) # define POWER_OF_TWO(n) ((((n) - 1) & (n)) == 0 && (n) > 0) #else /* * Map an ID to a hash location. */ # define H5I_LOC(a,s) (((hid_t)(a)&ID_MASK)%(s)) #endif /* Combine a Group number and an atom index into an atom */ #define H5I_MAKE(g,i) ((((hid_t)(g)&GROUP_MASK)<