2003-04-01 02:30:57 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
* Copyright by The HDF Group. *
|
2003-04-01 02:30:57 +08:00
|
|
|
* 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 *
|
2017-04-18 03:32:16 +08:00
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
|
|
|
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
|
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
* help@hdfgroup.org. *
|
2003-04-01 02:30:57 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
1998-03-31 03:24:08 +08:00
|
|
|
/*
|
|
|
|
* Programmer: Robb Matzke <matzke@llnl.gov>
|
|
|
|
* Friday, March 27, 1998
|
|
|
|
*/
|
|
|
|
#ifndef _H5HGprivate_H
|
|
|
|
#define _H5HGprivate_H
|
|
|
|
|
2003-05-16 03:22:33 +08:00
|
|
|
/* Include package's public header */
|
2001-04-06 01:29:14 +08:00
|
|
|
#include "H5HGpublic.h"
|
2003-05-16 03:22:33 +08:00
|
|
|
|
|
|
|
/* Private headers needed by this file. */
|
|
|
|
#include "H5Fprivate.h" /* File access */
|
1998-04-03 11:29:38 +08:00
|
|
|
|
2003-05-16 03:22:33 +08:00
|
|
|
/* Information to locate object in global heap */
|
1998-04-03 11:29:38 +08:00
|
|
|
typedef struct H5HG_t {
|
|
|
|
haddr_t addr; /*address of collection */
|
2004-12-29 22:26:20 +08:00
|
|
|
size_t idx; /*object ID within collection */
|
1998-04-03 11:29:38 +08:00
|
|
|
} H5HG_t;
|
1998-03-31 03:24:08 +08:00
|
|
|
|
2003-07-10 02:00:43 +08:00
|
|
|
/* Typedef for heap in memory (defined in H5HGpkg.h) */
|
1998-04-03 11:29:38 +08:00
|
|
|
typedef struct H5HG_heap_t H5HG_heap_t;
|
1998-03-31 03:24:08 +08:00
|
|
|
|
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F
internal routines, but really aren't part of the H5F "package".
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
2011-07-21 05:47:15 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Limit global heap collections to the some reasonable size. This is
|
|
|
|
* fairly arbitrary, but needs to be small enough that no more than H5HG_MAXIDX
|
|
|
|
* objects will be allocated from a single heap.
|
|
|
|
*/
|
|
|
|
#define H5HG_MAXSIZE 65536
|
|
|
|
|
|
|
|
/* If the module using this macro is allowed access to the private variables, access them directly */
|
2015-09-14 11:58:59 +08:00
|
|
|
#ifdef H5HG_MODULE
|
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F
internal routines, but really aren't part of the H5F "package".
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
2011-07-21 05:47:15 +08:00
|
|
|
#define H5HG_ADDR(H) ((H)->addr)
|
|
|
|
#define H5HG_SIZE(H) ((H)->size)
|
|
|
|
#define H5HG_FREE_SIZE(H) ((H)->obj[0].size)
|
2015-09-14 11:58:59 +08:00
|
|
|
#else /* H5HG_MODULE */
|
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F
internal routines, but really aren't part of the H5F "package".
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
2011-07-21 05:47:15 +08:00
|
|
|
#define H5HG_ADDR(H) (H5HG_get_addr(H))
|
|
|
|
#define H5HG_SIZE(H) (H5HG_get_size(H))
|
|
|
|
#define H5HG_FREE_SIZE(H) (H5HG_get_free_size(H))
|
2015-09-14 11:58:59 +08:00
|
|
|
#endif /* H5HG_MODULE */
|
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F
internal routines, but really aren't part of the H5F "package".
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
2011-07-21 05:47:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* Main global heap routines */
|
2003-02-11 01:26:09 +08:00
|
|
|
H5_DLL herr_t H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj,
|
1999-02-19 00:21:34 +08:00
|
|
|
H5HG_t *hobj/*out*/);
|
2006-09-26 06:22:14 +08:00
|
|
|
H5_DLL void *H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object, size_t *buf_size/*out*/);
|
2003-10-06 05:12:26 +08:00
|
|
|
H5_DLL int H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust);
|
2015-02-21 05:53:35 +08:00
|
|
|
H5_DLL herr_t H5HG_get_obj_size(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, size_t *obj_size);
|
2003-02-11 01:26:09 +08:00
|
|
|
H5_DLL herr_t H5HG_remove(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj);
|
2003-07-10 02:00:43 +08:00
|
|
|
|
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F
internal routines, but really aren't part of the H5F "package".
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
2011-07-21 05:47:15 +08:00
|
|
|
/* Support routines */
|
|
|
|
H5_DLL herr_t H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need);
|
|
|
|
|
|
|
|
/* Query routines */
|
|
|
|
H5_DLL haddr_t H5HG_get_addr(const H5HG_heap_t *h);
|
|
|
|
H5_DLL size_t H5HG_get_size(const H5HG_heap_t *h);
|
|
|
|
H5_DLL size_t H5HG_get_free_size(const H5HG_heap_t *h);
|
|
|
|
|
2003-07-10 02:00:43 +08:00
|
|
|
/* Debugging functions */
|
2003-02-11 01:26:09 +08:00
|
|
|
H5_DLL herr_t H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
|
2001-08-15 06:09:56 +08:00
|
|
|
int fwidth);
|
1998-03-31 03:24:08 +08:00
|
|
|
|
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F
internal routines, but really aren't part of the H5F "package".
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
2011-07-21 05:47:15 +08:00
|
|
|
#endif /* _H5HGprivate_H */
|
|
|
|
|