[h5py] 283/455: Add H5Pset_sieve_buf_size
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.
commit 2172cc51f3a2c97ef1d8e1d41ecd39cfcf081019
Author: andrewcollette <andrew.collette at gmail.com>
Date: Wed Jun 17 20:16:17 2009 +0000
Add H5Pset_sieve_buf_size
---
h5py/defs.pxd | 3 ++-
h5py/h5p_faid.pxi | 23 +++++++++++++++++++++++
h5py/tests/test_h5p.py | 4 ++++
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/h5py/defs.pxd b/h5py/defs.pxd
index 03d11da..b45a8b4 100644
--- a/h5py/defs.pxd
+++ b/h5py/defs.pxd
@@ -758,7 +758,8 @@ cdef extern from "hdf5.h":
H5Z_EDC_t H5Pget_edc_check(hid_t plist) except *
# Other properties
- herr_t H5Pset_sieve_buf_size(hid_t fapl_id, hsize_t size) except *
+ herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size) except *
+ herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size) except *
herr_t H5Pset_fapl_log(hid_t fapl_id, char *logfile,
unsigned int flags, size_t buf_size) except *
diff --git a/h5py/h5p_faid.pxi b/h5py/h5p_faid.pxi
index 9eb8862..4bfa84a 100644
--- a/h5py/h5p_faid.pxi
+++ b/h5py/h5p_faid.pxi
@@ -187,4 +187,27 @@ cdef class PropFAID(PropInstanceID):
H5Pget_cache(self.id, &mdc, &rdcc, &rdcc_nbytes, &w0)
return (mdc, rdcc, rdcc_nbytes, w0)
+ @sync
+ def set_sieve_buf_size(self, size_t size):
+ """ (UINT size)
+
+ Set the maximum size of the data sieve buffer (in bytes). This
+ buffer can improve I/O performance for hyperslab I/O, by combining
+ reads and writes into blocks of the given size. The default is 64k.
+ """
+ H5Pset_sieve_buf_size(self.id, size)
+
+ @sync
+ def get_sieve_buf_size(self):
+ """ () => UINT size
+
+ Get the current maximum size of the data sieve buffer (in bytes).
+ """
+ cdef size_t size
+ H5Pget_sieve_buf_size(self.id, &size)
+ return size
+
+
+
+
diff --git a/h5py/tests/test_h5p.py b/h5py/tests/test_h5p.py
index 0676033..8de5d41 100644
--- a/h5py/tests/test_h5p.py
+++ b/h5py/tests/test_h5p.py
@@ -72,6 +72,10 @@ class TestFAID(unittest.TestCase):
self.p.set_fapl_core(*settings)
self.assertEqual(self.p.get_fapl_core(), settings)
+ def test_sieve(self):
+ self.p.get_sieve_buf_size()
+ self.p.set_sieve_buf_size(128*1024)
+ self.assertEqual(self.p.get_sieve_buf_size(), 128*1024)
class TestDCID(unittest.TestCase):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git
More information about the debian-science-commits
mailing list