summaryrefslogtreecommitdiffstats
path: root/src/H5EAprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-08-29 20:44:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-08-29 20:44:11 (GMT)
commitc78dc8defa003eb2fe95dcae6fe115443cdcbffc (patch)
treed110b661509005e865690cf40bc10e07466b43b7 /src/H5EAprivate.h
parent90e4c8770646a057dfc1efa88a64e219d65f31e0 (diff)
downloadhdf5-c78dc8defa003eb2fe95dcae6fe115443cdcbffc.zip
hdf5-c78dc8defa003eb2fe95dcae6fe115443cdcbffc.tar.gz
hdf5-c78dc8defa003eb2fe95dcae6fe115443cdcbffc.tar.bz2
[svn-r15561] Description:
Update extensible array code with function to open an existing earray, add more tests and avoid running the test when core/split/family/multi VFDs are used. Clean up fractal heap test code a bit and expand some of the tests a little bit also. Tested on: Mac OS X/32 10.5.4 (amazon) in debug mode Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) 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, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5EAprivate.h')
-rw-r--r--src/H5EAprivate.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index 6a7fc67..e39cefe 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -46,9 +46,33 @@
/* Library Private Typedefs */
/****************************/
+/* Extensible array class IDs */
+typedef enum H5EA_cls_id_t {
+ /* Start real class IDs at 0 -QAK */
+ H5EA_CLS_TEST_ID, /* Extensible array is for testing (do not use for actual data) */
+ H5EA_NUM_CLS_ID /* Number of Extensible Array class IDs (must be last) */
+} H5EA_cls_id_t;
+
+/*
+ * Each type of element that can be stored in an extesible array has a
+ * variable of this type that contains class variables and methods.
+ */
+typedef struct H5EA_class_t {
+ H5EA_cls_id_t id; /* ID of Extensible Array class, as found in file */
+ size_t nat_elmt_size; /* Size of native (memory) element */
+
+ /* Extensible array client callback methods */
+ herr_t (*fill)(uint8_t *raw_blk, size_t nelmts); /* Fill array of elements with encoded form of "missing element" value */
+ herr_t (*encode)(uint8_t *raw, const void *elmt); /* Encode element from native form to disk storage form */
+ herr_t (*decode)(const uint8_t *raw, void *elmt); /* Decode element from disk storage form to native form */
+ herr_t (*debug)(FILE *stream, int indent, int fwidth, const void *elmt); /* Print an element for debugging */
+} H5EA_class_t;
+
/* Extensible array creation parameters */
typedef struct H5EA_create_t {
- uint8_t elmt_size; /* Element size (in bytes) */
+ const H5EA_class_t *cls; /* Class of extensible array to create */
+ uint8_t raw_elmt_size; /* Element size in file (in bytes) */
+ uint8_t max_nelmts_bits; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */
uint8_t idx_blk_elmts; /* # of elements to store in index block */
uint8_t data_blk_min_elmts; /* Min. # of elements per data block */
uint8_t sup_blk_min_data_ptrs; /* Min. # of data block pointers for a super block */
@@ -75,6 +99,7 @@ typedef struct H5EA_t H5EA_t;
/* General routines */
H5_DLL H5EA_t *H5EA_create(H5F_t *f, hid_t dxpl_id, const H5EA_create_t *cparam);
+H5_DLL H5EA_t *H5EA_open(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr);
H5_DLL herr_t H5EA_get_nelmts(const H5EA_t *ea, hsize_t *nelmts);
H5_DLL herr_t H5EA_get_addr(const H5EA_t *ea, haddr_t *addr);
H5_DLL herr_t H5EA_delete(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr);