summaryrefslogtreecommitdiffstats
path: root/src/H5Dtest.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-02-24 17:59:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-02-24 17:59:14 (GMT)
commit33a65add7db18a4efd2b34ac8261c2065820ebf9 (patch)
tree782730a42955d1a247fec9356c5d05f83cce4903 /src/H5Dtest.c
parente63f0baf7e3a8e36c19f52d7692b483b7440e5eb (diff)
downloadhdf5-33a65add7db18a4efd2b34ac8261c2065820ebf9.zip
hdf5-33a65add7db18a4efd2b34ac8261c2065820ebf9.tar.gz
hdf5-33a65add7db18a4efd2b34ac8261c2065820ebf9.tar.bz2
[svn-r16514] Description:
Merge r16440:16500 from trunk into revise_chunks branch. Tested on: 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 Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Dtest.c')
-rw-r--r--src/H5Dtest.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index b71ba30..34ea99f 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -176,3 +176,49 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D_layout_idx_type_test() */
+
+/*--------------------------------------------------------------------------
+ NAME
+ H5D_current_cache_size_test
+ PURPOSE
+ Determine current the size of the dataset's chunk cache
+ USAGE
+ herr_t H5D_layout_contig_size_test(did, size)
+ hid_t did; IN: Dataset to query
+ hsize_t *size; OUT: Pointer to location to place size info
+ RETURNS
+ Non-negative on success, negative on failure
+ DESCRIPTION
+ Checks the size of a contiguous dataset's storage.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+herr_t
+H5D_current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
+{
+ H5D_t *dset; /* Pointer to dataset to query */
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_NOAPI(H5D_current_cache_size_test, FAIL)
+
+ /* Check args */
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+
+ if(nbytes_used) {
+ HDassert(dset->shared->layout.type == H5D_CHUNKED);
+ *nbytes_used = dset->shared->cache.chunk.nbytes_used;
+ } /* end if */
+
+ if(nused) {
+ HDassert(dset->shared->layout.type == H5D_CHUNKED);
+ *nused = dset->shared->cache.chunk.nused;
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5D_current_cache_size_test() */
+