summaryrefslogtreecommitdiffstats
path: root/src/H5EAhdr.c
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/H5EAhdr.c
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/H5EAhdr.c')
-rw-r--r--src/H5EAhdr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index 2f14e6c..5fbcaf9 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -49,6 +49,8 @@
/* Local Macros */
/****************/
+/* Max. # of bits for max. nelmts index */
+#define H5EA_MAX_NELMTS_IDX_MAX 64
/******************/
/* Local Typedefs */
@@ -157,8 +159,12 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
#ifndef NDEBUG
/* Check for valid parameters */
- if(cparam->elmt_size == 0)
+ if(cparam->raw_elmt_size == 0)
H5E_THROW(H5E_BADVALUE, "element size must be greater than zero")
+ if(cparam->max_nelmts_bits == 0)
+ H5E_THROW(H5E_BADVALUE, "max. # of nelmts bitsmust be greater than zero")
+ if(cparam->max_nelmts_bits > H5EA_MAX_NELMTS_IDX_MAX)
+ H5E_THROW(H5E_BADVALUE, "element size must be <= %u", (unsigned)H5EA_MAX_NELMTS_IDX_MAX)
if(!POWER_OF_TWO(cparam->sup_blk_min_data_ptrs))
H5E_THROW(H5E_BADVALUE, "min # of data block pointers in super block not power of two")
if(!POWER_OF_TWO(cparam->data_blk_min_elmts))
@@ -172,7 +178,8 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Set the internal parameters for the array */
/* Set the creation parameters for the array */
- hdr->elmt_size = cparam->elmt_size;
+ hdr->raw_elmt_size = cparam->raw_elmt_size;
+ hdr->max_nelmts_bits = cparam->max_nelmts_bits;
hdr->idx_blk_elmts = cparam->idx_blk_elmts;
hdr->sup_blk_min_data_ptrs = cparam->sup_blk_min_data_ptrs;
hdr->data_blk_min_elmts = cparam->data_blk_min_elmts;