summaryrefslogtreecommitdiffstats
path: root/src/H5EAcache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-11-18 00:05:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-11-18 00:05:45 (GMT)
commita28e8407cf5a526a20ad682382f0faed58aace76 (patch)
treebe0dc3b77a701265e64d7914bd480f7f797cde86 /src/H5EAcache.c
parent4a219c18b65436d9abce2b6554e0dc153745b3b5 (diff)
downloadhdf5-a28e8407cf5a526a20ad682382f0faed58aace76.zip
hdf5-a28e8407cf5a526a20ad682382f0faed58aace76.tar.gz
hdf5-a28e8407cf5a526a20ad682382f0faed58aace76.tar.bz2
[svn-r16093] Description:
Initial changes to allow data blocks to be paged in, instead of loaded completely. Also, refactored test code to be smaller and more maintainable. Tested on: Mac OS X/32 10.5.5 (amazon) in debug mode Mac OS X/32 10.5.5 (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 (jam) 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/H5EAcache.c')
-rw-r--r--src/H5EAcache.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 0f454bc..b8b5786 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -235,14 +235,17 @@ H5EA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_cls,
hdr->cparam.idx_blk_elmts = *p++; /* # of elements to store in index block */
hdr->cparam.data_blk_min_elmts = *p++; /* Min. # of elements per data block */
hdr->cparam.sup_blk_min_data_ptrs = *p++; /* Min. # of data block pointers for a super block */
+ hdr->cparam.max_dblk_page_nelmts_bits = *p++; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */
- /* Internal information */
- H5F_addr_decode(f, &p, &hdr->idx_blk_addr); /* Address of index block */
+ /* Array statistics */
H5F_DECODE_LENGTH(f, p, hdr->stats.max_idx_set); /* Max. index set (+1) */
H5F_DECODE_LENGTH(f, p, hdr->stats.nsuper_blks); /* Number of super blocks created */
H5F_DECODE_LENGTH(f, p, hdr->stats.ndata_blks); /* Number of data blocks created */
H5F_DECODE_LENGTH(f, p, hdr->stats.nelmts); /* Number of elements 'realized' */
+ /* Internal information */
+ H5F_addr_decode(f, &p, &hdr->idx_blk_addr); /* Address of index block */
+
/* Sanity check */
/* (allow for checksum not decoded yet) */
HDassert((size_t)(p - buf) == (size - H5EA_SIZEOF_CHKSUM));
@@ -343,14 +346,17 @@ H5EA__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
*p++ = hdr->cparam.idx_blk_elmts; /* # of elements to store in index block */
*p++ = hdr->cparam.data_blk_min_elmts; /* Min. # of elements per data block */
*p++ = hdr->cparam.sup_blk_min_data_ptrs; /* Min. # of data block pointers for a super block */
+ *p++ = hdr->cparam.max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */
- /* Internal information */
- H5F_addr_encode(f, &p, hdr->idx_blk_addr); /* Address of index block */
+ /* Array statistics */
H5F_ENCODE_LENGTH(f, p, hdr->stats.max_idx_set); /* Max. index set (+1) */
H5F_ENCODE_LENGTH(f, p, hdr->stats.nsuper_blks); /* Number of super blocks created */
H5F_ENCODE_LENGTH(f, p, hdr->stats.ndata_blks); /* Number of data blocks created */
H5F_ENCODE_LENGTH(f, p, hdr->stats.nelmts); /* Number of elements 'realized' */
+ /* Internal information */
+ H5F_addr_encode(f, &p, hdr->idx_blk_addr); /* Address of index block */
+
/* Compute metadata checksum */
metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0);