summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-12-06 19:05:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-12-06 19:05:12 (GMT)
commit7a30de3a2bf48a81dcf7679782ba4e247bd8991e (patch)
treebf62d63e3303453ed60f8bca611f8ad56b37fedd
parent1b67380c0abcf87ae05f8661647dacd75858b50e (diff)
downloadhdf5-7a30de3a2bf48a81dcf7679782ba4e247bd8991e.zip
hdf5-7a30de3a2bf48a81dcf7679782ba4e247bd8991e.tar.gz
hdf5-7a30de3a2bf48a81dcf7679782ba4e247bd8991e.tar.bz2
[svn-r4680] Purpose:
Code cleanup Description: Property that H5P(g|s)et_hyper_cache uses is no longer in use inside the library. Solution: Removed H5P(g|s)et_hyper_cache API functions, except when backward compatibility is turned on. When backward compatibility is turned on, the property is defined by the library, but unused internally. Platforms tested: FreeBSD 4.4 (sleipnir)
-rw-r--r--c++/src/H5DxferProp.cpp2
-rw-r--r--c++/src/H5DxferProp.h2
-rw-r--r--release_docs/RELEASE.txt2
-rw-r--r--src/H5D.c4
-rw-r--r--src/H5Dprivate.h6
-rw-r--r--src/H5P.c4
-rw-r--r--src/H5Ppublic.h4
-rw-r--r--test/tselect.c2
8 files changed, 20 insertions, 6 deletions
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index 36d2405..9c3c1ea 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -93,6 +93,7 @@ bool DSetMemXferPropList::getPreserve() const
}
}
+#ifdef H5_WANT_H5_V1_4_COMPAT
// Indicates whether to cache hyperslab blocks during I/O
void DSetMemXferPropList::setHyperCache( bool cache, unsigned limit ) const
{
@@ -119,6 +120,7 @@ void DSetMemXferPropList::getHyperCache( bool& cache, unsigned& limit ) const
else
cache = false;
}
+#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets B-tree split ratios for a dataset transfer property list
void DSetMemXferPropList::setBtreeRatios( double left, double middle, double right ) const
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index a612805..9c10c78 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -36,11 +36,13 @@ class DSetMemXferPropList : public PropList {
// Checks status of the dataset transfer property list
bool getPreserve() const;
+#ifdef H5_WANT_H5_V1_4_COMPAT
// Indicates whether to cache hyperslab blocks during I/O
void setHyperCache( bool cache, unsigned limit = 0 ) const;
// Returns information regarding the caching of hyperslab blocks during I/O
void getHyperCache( bool& cache, unsigned& limit ) const;
+#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets B-tree split ratios for a dataset transfer property list
void setBtreeRatios( double left, double middle, double right ) const;
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 901e710..c5bce70 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -185,6 +185,8 @@ New Features
writing.
* Improved performance of non-contiguous hyperslabs (built up with
several hyperslab selection calls).
+ * Removed H5P(get|set)_hyper_cache API function, since the property is no
+ longer used.
Platforms Tested
================
diff --git a/src/H5D.c b/src/H5D.c
index 32595f4..b97d759 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -143,8 +143,10 @@ H5D_init_interface(void)
void *def_bkgr_buf = H5D_XFER_BKGR_BUF_DEF;
H5T_bkg_t def_bkgr_buf_type = H5D_XFER_BKGR_BUF_TYPE_DEF;
double def_btree_split_ratio[3] = H5D_XFER_BTREE_SPLIT_RATIO_DEF;
+#ifdef H5_WANT_H5_V1_4_COMPAT
unsigned def_hyper_cache = H5D_XFER_HYPER_CACHE_DEF;
unsigned def_hyper_cache_lim = H5D_XFER_HYPER_CACHE_LIM_DEF;
+#endif /* H5_WANT_H5_V1_4_COMPAT */
H5MM_allocate_t def_vlen_alloc = H5D_XFER_VLEN_ALLOC_DEF;
void *def_vlen_alloc_info = H5D_XFER_VLEN_ALLOC_INFO_DEF;
H5MM_free_t def_vlen_free = H5D_XFER_VLEN_FREE_DEF;
@@ -216,6 +218,7 @@ H5D_init_interface(void)
if(H5P_register(xfer_pclass,H5D_XFER_BTREE_SPLIT_RATIO_NAME,H5D_XFER_BTREE_SPLIT_RATIO_SIZE,&def_btree_split_ratio,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class");
+#ifdef H5_WANT_H5_V1_4_COMPAT
/* Register the hyperslab caching property */
if(H5P_register(xfer_pclass,H5D_XFER_HYPER_CACHE_NAME,H5D_XFER_HYPER_CACHE_SIZE,&def_hyper_cache,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class");
@@ -223,6 +226,7 @@ H5D_init_interface(void)
/* Register the hyperslab cache limit property */
if(H5P_register(xfer_pclass,H5D_XFER_HYPER_CACHE_LIM_NAME,H5D_XFER_HYPER_CACHE_LIM_SIZE,&def_hyper_cache_lim,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class");
+#endif /* H5_WANT_H5_V1_4_COMPAT */
/* Register the vlen allocation function property */
if(H5P_register(xfer_pclass,H5D_XFER_VLEN_ALLOC_NAME,H5D_XFER_VLEN_ALLOC_SIZE,&def_vlen_alloc,NULL,NULL,NULL,NULL,NULL,NULL)<0)
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 0e51a4b..b2fb668 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -89,6 +89,7 @@
#define H5D_XFER_BTREE_SPLIT_RATIO_NAME "btree_split_ratio"
#define H5D_XFER_BTREE_SPLIT_RATIO_SIZE sizeof(double[3])
#define H5D_XFER_BTREE_SPLIT_RATIO_DEF {0.1, 0.5, 0.9}
+#ifdef H5_WANT_H5_V1_4_COMPAT
/* Definitions for hyperslab caching property */
#define H5D_XFER_HYPER_CACHE_NAME "hyper_cache"
#define H5D_XFER_HYPER_CACHE_SIZE sizeof(unsigned)
@@ -101,10 +102,7 @@
#define H5D_XFER_HYPER_CACHE_LIM_NAME "hyper_cache_limit"
#define H5D_XFER_HYPER_CACHE_LIM_SIZE sizeof(unsigned)
#define H5D_XFER_HYPER_CACHE_LIM_DEF 0
-/* Definitions for hyperslab cache limit property */
-#define H5D_XFER_HYPER_CACHE_LIM_NAME "hyper_cache_limit"
-#define H5D_XFER_HYPER_CACHE_LIM_SIZE sizeof(unsigned)
-#define H5D_XFER_HYPER_CACHE_LIM_DEF 0
+#endif /* H5_WANT_H5_V1_4_COMPAT */
/* Definitions for vlen allocation function property */
#define H5D_XFER_VLEN_ALLOC_NAME "vlen_alloc"
#define H5D_XFER_VLEN_ALLOC_SIZE sizeof(H5MM_allocate_t)
diff --git a/src/H5P.c b/src/H5P.c
index be030a7..f1f6a5c 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -6,7 +6,7 @@
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
-* hdf/COPYING file. *
+* COPYING file. *
* *
****************************************************************************/
@@ -2596,6 +2596,7 @@ done:
#endif /* H5_WANT_H5_V1_4_COMPAT */
+#ifdef H5_WANT_H5_V1_4_COMPAT
/*-------------------------------------------------------------------------
* Function: H5Pset_hyper_cache
@@ -2692,6 +2693,7 @@ H5Pget_hyper_cache(hid_t plist_id, unsigned *cache/*out*/,
done:
FUNC_LEAVE(ret_value);
}
+#endif /* H5_WANT_H5_V1_4_COMPAT */
/*-------------------------------------------------------------------------
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index fc5f551..5f404b6 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -6,7 +6,7 @@
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
- * hdf/COPYING file. *
+ * COPYING file. *
* *
****************************************************************************/
@@ -215,10 +215,12 @@ __DLL__ herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts/*out*/,
size_t *rdcc_nelmts/*out*/,
size_t *rdcc_nbytes/*out*/, double *rdcc_w0);
#endif /* H5_WANT_H5_V1_4_COMPAT */
+#ifdef H5_WANT_H5_V1_4_COMPAT
__DLL__ herr_t H5Pset_hyper_cache(hid_t plist_id, unsigned cache,
unsigned limit);
__DLL__ herr_t H5Pget_hyper_cache(hid_t plist_id, unsigned *cache,
unsigned *limit);
+#endif /* H5_WANT_H5_V1_4_COMPAT */
__DLL__ herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle,
double right);
__DLL__ herr_t H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/,
diff --git a/test/tselect.c b/test/tselect.c
index 0250786..c5aa682 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -2232,8 +2232,10 @@ test_select_hyper_union(void)
xfer = H5Pcreate (H5P_DATASET_XFER);
CHECK(xfer, FAIL, "H5Pcreate");
+#ifdef H5_WANT_H5_V1_4_COMPAT
ret = H5Pset_hyper_cache(xfer,0,1);
CHECK(ret, FAIL, "H5Pset_hyper_cache");
+#endif /* H5_WANT_H5_V1_4_COMPAT */
/* Write selection to disk */
ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer,wbuf);