summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-12-05 16:12:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-12-05 16:12:32 (GMT)
commita9c747deba6e588b2ec5bc624a53c976a9faa3bc (patch)
tree4a9c1f2c4f2b383a62e2f9e8b87ab3ef154f810c /c++/src
parent2167e3c495aada1c47375cdf923d26c583dce768 (diff)
downloadhdf5-a9c747deba6e588b2ec5bc624a53c976a9faa3bc.zip
hdf5-a9c747deba6e588b2ec5bc624a53c976a9faa3bc.tar.gz
hdf5-a9c747deba6e588b2ec5bc624a53c976a9faa3bc.tar.bz2
[svn-r4669] Purpose:
Backward Compatibility Fix Description: One of H5P[gs]et_cache's parameters changed between v1.4 and the development branch. Solution: Added v1.4 compat stuff around H5P[gs]et_cache implementation and testing to allow v1.4.x users to continue to use their source code without modification. These changes are for everything except the FORTRAN wrappers - I spoke with Elena and she will make the FORTRAN wrapper changes. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5FaccProp.cpp20
-rw-r--r--c++/src/H5FaccProp.h9
2 files changed, 29 insertions, 0 deletions
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index 4eae889..9625c00 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -189,6 +189,7 @@ void FileAccPropList::getMpi( MPI_Comm& comm, MPI_Info& info ) const
}
*/
+#ifdef H5_WANT_H5_V1_4_COMPAT
void FileAccPropList::setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const
{
herr_t ret_value = H5Pset_cache( id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 );
@@ -198,6 +199,24 @@ void FileAccPropList::setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nby
}
}
+void FileAccPropList::getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const
+{
+ herr_t ret_value = H5Pget_cache( id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0 );
+ if( ret_value < 0 )
+ {
+ throw PropListIException("FileAccPropList::getCache", "H5Pget_cache failed");
+ }
+}
+#else /* H5_WANT_H5_V1_4_COMPAT */
+void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const
+{
+ herr_t ret_value = H5Pset_cache( id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 );
+ if( ret_value < 0 )
+ {
+ throw PropListIException("FileAccPropList::setCache", "H5Pset_cache failed");
+ }
+}
+
void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const
{
herr_t ret_value = H5Pget_cache( id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0 );
@@ -206,6 +225,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rd
throw PropListIException("FileAccPropList::getCache", "H5Pget_cache failed");
}
}
+#endif /* H5_WANT_H5_V1_4_COMPAT */
void FileAccPropList::setGcReferences( unsigned gc_ref ) const
{
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 2851b5f..c48c65a 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -61,12 +61,21 @@ class FileAccPropList : public PropList {
// family driver and retrieves the member's file access property list.
// bool getFamily( hsize_t& memb_size, FileAccPropList& memb_plist ) const;
+#ifdef H5_WANT_H5_V1_4_COMPAT
// Sets the meta data cache and raw data chunk cache parameters.
void setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
// Retrieves maximum sizes of data caches and the preemption
// policy value.
+ void getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
+#else /* H5_WANT_H5_V1_4_COMPAT */
+ // Sets the meta data cache and raw data chunk cache parameters.
+ void setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
+
+ // Retrieves maximum sizes of data caches and the preemption
+ // policy value.
void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
+#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets the low-level driver to split meta data from raw data.
// void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,