summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-02-06 15:34:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-02-06 15:34:01 (GMT)
commitd8cfeadd906c13421c4fe9abe1a5318a956236f6 (patch)
tree1c0c4c1f988ebd2ec44de73411bd8dcc136c6464 /src/H5Pdcpl.c
parentaaeecad6564fe93bb8de567220eed453f890acf4 (diff)
downloadhdf5-d8cfeadd906c13421c4fe9abe1a5318a956236f6.zip
hdf5-d8cfeadd906c13421c4fe9abe1a5318a956236f6.tar.gz
hdf5-d8cfeadd906c13421c4fe9abe1a5318a956236f6.tar.bz2
[svn-r8158] Purpose:
Code cleanup/optimization Description: Query property list values once, at the beginning of the I/O routines, instead of querying the property list values multiple (lots!) of times in lower level routines. Solution: Create "property list caches" for internal library queries of the property list values. Platforms tested: IBM p690 (copper) w/parallel & fphdf5 h5committest
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c50
1 files changed, 8 insertions, 42 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 0493db8..a510f85 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1388,45 +1388,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5P_fill_value_defined
- *
- * Purpose: Check if fill value is defined. Internal version of function
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Raymond Lu
- * Wednesday, January 16, 2002
- *
- * Modifications:
- *
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status)
-{
- herr_t ret_value = SUCCEED;
- H5O_fill_t fill;
-
- FUNC_ENTER_NOAPI(H5P_fill_value_defined, FAIL);
-
- assert(plist);
- assert(status);
-
- /* Get the fill value struct */
- if(H5P_get(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value");
-
- /* Get the fill-value status */
- if(H5P_is_fill_value_defined(&fill, status) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't check fill value status");
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5P_fill_value_defined() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5Pfill_value_defined
*
* Purpose: Check if fill value is defined.
@@ -1445,6 +1406,7 @@ herr_t
H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status)
{
H5P_genplist_t *plist;
+ H5O_fill_t fill;
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(H5Pfill_value_defined, FAIL);
@@ -1456,9 +1418,13 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status)
if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
- /* Call the internal function */
- if(H5P_fill_value_defined(plist, status) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value info");
+ /* Get the fill value struct */
+ if(H5P_get(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value");
+
+ /* Get the fill-value status */
+ if(H5P_is_fill_value_defined(&fill, status) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't check fill value status");
done:
FUNC_LEAVE_API(ret_value);