diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2007-01-29 02:41:54 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2007-01-29 02:41:54 (GMT) |
commit | d646c29642220725eb94ba9fffc1c39b560c0b59 (patch) | |
tree | 378a8cd364ae7313b02c25d4800b1e1dd776c562 | |
parent | 38480e665742a86bd50fad08360ea3e5bde5db9d (diff) | |
download | hdf5-d646c29642220725eb94ba9fffc1c39b560c0b59.zip hdf5-d646c29642220725eb94ba9fffc1c39b560c0b59.tar.gz hdf5-d646c29642220725eb94ba9fffc1c39b560c0b59.tar.bz2 |
[svn-r13211] Purpose: Adding wrappers
Description:
Added wrapper DSetCreatPropList::setSzip.
Platforms tested
AIX 5.1 (copper)
SunOS 5.8 64-bit (sol)
Linux 2.6 (kagiso)
-rw-r--r-- | c++/src/H5DcreatProp.cpp | 31 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.h | 9 |
2 files changed, 35 insertions, 5 deletions
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index bc9fb03..f7d6fc4 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -169,6 +169,33 @@ void DSetCreatPropList::setDeflate( int level ) const } //-------------------------------------------------------------------------- +// Function: DSetCreatPropList::setSzip +///\brief Sets up for the use of the SZIP compression filter. +///\param options_mask - IN: A bit-mask conveying the desired SZIP +/// options. Valid values are H5_SZIP_EC_OPTION_MASK +/// and H5_SZIP_NN_OPTION_MASK. +///\param pixels_per_block - IN: Number of pixels or data elements in +/// each data block. +///\exception H5::PropListIException +///\par Description +/// The associate C function sets an SZIP compression filter, +/// H5Z_FILTER_SZIP, for a dataset. For more information about +/// SZIP and usage, please refer to the C layer Reference +/// Manual at: +/// http://hdfgroup.org/HDF5/doc/RM_H5P.html#Property-SetSzip +// Programmer Binh-Minh Ribler - Jan, 2007 +//-------------------------------------------------------------------------- +void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const +{ + herr_t ret_value = H5Pset_szip(id, options_mask, pixels_per_block); + if( ret_value < 0 ) + { + throw PropListIException("DSetCreatPropList::setSzip", + "H5Pset_szip failed"); + } +} + +//-------------------------------------------------------------------------- // Function: DSetCreatPropList::setFillValue ///\brief Sets a dataset fill value ///\param fvalue_type - IN: Data type for the value passed via \a value @@ -438,7 +465,7 @@ bool DSetCreatPropList::allFiltersAvail() /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DSetCreatPropList::setShuffle() +void DSetCreatPropList::setShuffle() const { herr_t ret_value = H5Pset_shuffle(id); if( ret_value < 0 ) @@ -550,7 +577,7 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DSetCreatPropList::setFletcher32() +void DSetCreatPropList::setFletcher32() const { herr_t ret_value = H5Pset_fletcher32(id); if( ret_value < 0 ) diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 7f73a0c..a79f371 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -95,13 +95,16 @@ class H5_DLLCPP DSetCreatPropList : public PropList { void setExternal( const char* name, off_t offset, hsize_t size ) const; // Adds a filter to the filter pipeline. - void setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const; + void setFilter( H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0, const unsigned int cd_values[] = NULL) const; // Sets Fletcher32 checksum of EDC for this property list. - void setFletcher32(); + void setFletcher32() const; // Sets method of the shuffle filter. - void setShuffle(); + void setShuffle() const; + + // Sets SZIP compression method. + void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const; // Returns this class name virtual H5std_string fromClass () const { return("DSetCreatPropList"); } |