2004-05-28 04:24:08 +08:00
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* Copyright by The HDF Group. *
|
2004-05-28 04:24:08 +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 *
|
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
|
* access to either file, you may request a copy from help@hdfgroup.org. *
|
2004-05-28 04:24:08 +08:00
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
|
|
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
|
[svn-r19133] Description:
Correct traversal of user-defined links (including external links) to
retain path information of object, allowing H5Iget_name() queries to work
quickly (without searching entire destination file). This required some
refactoring and addition of a mechanism to detect if a "fast" query was
performed (for the tests).
Minor code cleanups, etc.
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/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) 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
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.4 (amazon) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
2010-07-28 20:27:56 +08:00
|
|
|
|
* Thursday, May 27, 2004
|
2004-05-28 04:24:08 +08:00
|
|
|
|
*
|
|
|
|
|
* Purpose: Dataset testing functions.
|
|
|
|
|
*/
|
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/****************/
|
|
|
|
|
/* Module Setup */
|
|
|
|
|
/****************/
|
|
|
|
|
|
2004-05-28 04:24:08 +08:00
|
|
|
|
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
|
|
|
|
|
#define H5D_TESTING /*suppress warning about H5D testing funcs*/
|
|
|
|
|
|
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/***********/
|
|
|
|
|
/* Headers */
|
|
|
|
|
/***********/
|
|
|
|
|
#include "H5private.h" /* Generic Functions */
|
2004-05-28 04:24:08 +08:00
|
|
|
|
#include "H5Dpkg.h" /* Datasets */
|
2005-10-21 23:52:54 +08:00
|
|
|
|
#include "H5Eprivate.h" /* Error handling */
|
|
|
|
|
#include "H5Iprivate.h" /* IDs */
|
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/****************/
|
|
|
|
|
/* Local Macros */
|
|
|
|
|
/****************/
|
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/******************/
|
|
|
|
|
/* Local Typedefs */
|
|
|
|
|
/******************/
|
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/********************/
|
|
|
|
|
/* Local Prototypes */
|
|
|
|
|
/********************/
|
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/*********************/
|
|
|
|
|
/* Package Variables */
|
|
|
|
|
/*********************/
|
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/*******************/
|
|
|
|
|
/* Local Variables */
|
|
|
|
|
/*******************/
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------
|
|
|
|
|
NAME
|
|
|
|
|
H5D_layout_version_test
|
|
|
|
|
PURPOSE
|
|
|
|
|
Determine the storage layout version for a dataset's layout information
|
|
|
|
|
USAGE
|
|
|
|
|
herr_t H5D_layout_version_test(did, version)
|
|
|
|
|
hid_t did; IN: Dataset to query
|
|
|
|
|
unsigned *version; OUT: Pointer to location to place version info
|
|
|
|
|
RETURNS
|
|
|
|
|
Non-negative on success, negative on failure
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Checks the version of the storage layout information for a dataset.
|
|
|
|
|
GLOBAL VARIABLES
|
|
|
|
|
COMMENTS, BUGS, ASSUMPTIONS
|
|
|
|
|
DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING
|
|
|
|
|
EXAMPLES
|
|
|
|
|
REVISION LOG
|
|
|
|
|
--------------------------------------------------------------------------*/
|
|
|
|
|
herr_t
|
|
|
|
|
H5D_layout_version_test(hid_t did, unsigned *version)
|
|
|
|
|
{
|
2009-12-19 12:28:42 +08:00
|
|
|
|
H5D_t *dset; /* Pointer to dataset to query */
|
[svn-r18037] Description:
Bring r18035 from merge_metadata_journaling branch to trunk:
More "brush clearing" convergence between metadata_journaling branch
and the trunk.
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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-19 13:40:15 +08:00
|
|
|
|
herr_t ret_value = SUCCEED; /* return value */
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
FUNC_ENTER_NOAPI(H5D_layout_version_test, FAIL)
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
|
|
|
|
/* Check args */
|
2008-08-22 04:30:19 +08:00
|
|
|
|
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
|
[svn-r18037] Description:
Bring r18035 from merge_metadata_journaling branch to trunk:
More "brush clearing" convergence between metadata_journaling branch
and the trunk.
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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-19 13:40:15 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
|
|
|
|
if(version)
|
2008-08-22 04:30:19 +08:00
|
|
|
|
*version = dset->shared->layout.version;
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
|
|
|
|
done:
|
2008-08-22 04:30:19 +08:00
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2004-05-28 04:24:08 +08:00
|
|
|
|
} /* H5D_layout_version_test() */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------
|
|
|
|
|
NAME
|
|
|
|
|
H5D_layout_contig_size_test
|
|
|
|
|
PURPOSE
|
|
|
|
|
Determine the size of a contiguous layout for a dataset's layout information
|
|
|
|
|
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_layout_contig_size_test(hid_t did, hsize_t *size)
|
|
|
|
|
{
|
|
|
|
|
H5D_t *dset; /* Pointer to dataset to query */
|
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling 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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-17 23:07:35 +08:00
|
|
|
|
herr_t ret_value = SUCCEED; /* return value */
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
FUNC_ENTER_NOAPI(H5D_layout_contig_size_test, FAIL)
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
|
|
|
|
/* Check args */
|
2008-08-22 04:30:19 +08:00
|
|
|
|
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
|
[svn-r18037] Description:
Bring r18035 from merge_metadata_journaling branch to trunk:
More "brush clearing" convergence between metadata_journaling branch
and the trunk.
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/default API=1.8.x,
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-12-19 13:40:15 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
|
2004-05-28 04:24:08 +08:00
|
|
|
|
|
|
|
|
|
if(size) {
|
2008-08-22 04:30:19 +08:00
|
|
|
|
HDassert(dset->shared->layout.type == H5D_CONTIGUOUS);
|
[svn-r17275] Description:
Refactor dataet storage information further, moving the chunk operations
into the storage struct and also fine-tune the chunk index structure for index
callbacks.
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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.7 (amazon) in debug mode
Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-07-31 01:51:49 +08:00
|
|
|
|
*size = dset->shared->layout.storage.u.contig.size;
|
2004-05-28 04:24:08 +08:00
|
|
|
|
} /* end if */
|
|
|
|
|
|
|
|
|
|
done:
|
2008-08-22 04:30:19 +08:00
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2004-05-28 04:24:08 +08:00
|
|
|
|
} /* H5D_layout_contig_size_test() */
|
|
|
|
|
|
2009-02-13 04:46:32 +08:00
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------
|
|
|
|
|
NAME
|
|
|
|
|
H5D_current_cache_size_test
|
|
|
|
|
PURPOSE
|
|
|
|
|
Determine current the size of the dataset's chunk cache
|
|
|
|
|
USAGE
|
2009-07-30 11:27:41 +08:00
|
|
|
|
herr_t H5D_current_cache_size_test(did, size)
|
2009-02-13 04:46:32 +08:00
|
|
|
|
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() */
|
|
|
|
|
|