diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-09-21 23:43:19 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-09-21 23:43:19 (GMT) |
commit | 1fe48c7f19c2eed94a22179459efc1487ee65217 (patch) | |
tree | 41249aed6d1d5f95f6db00fa33ee7d40f434ca2a /src/H5Sall.c | |
parent | 7b189913384c500b71cb82d1780d6d07b170583c (diff) | |
download | hdf5-1fe48c7f19c2eed94a22179459efc1487ee65217.zip hdf5-1fe48c7f19c2eed94a22179459efc1487ee65217.tar.gz hdf5-1fe48c7f19c2eed94a22179459efc1487ee65217.tar.bz2 |
[svn-r712] Added temporary buffer support to several places in the library which were
calling malloc too often. Also, added caching of hyperslab blocks, which
improves performance _significantly_ for hyperslab I/O.
Diffstat (limited to 'src/H5Sall.c')
-rw-r--r-- | src/H5Sall.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c index 022170c..71d8181 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -11,6 +11,7 @@ #include <H5Eprivate.h> #include <H5Sprivate.h> #include <H5Vprivate.h> +#include <H5Dprivate.h> /* Interface initialization */ #define PABLO_MASK H5S_all_mask @@ -26,14 +27,14 @@ static size_t H5S_all_fgath (H5F_t *f, const struct H5O_layout_t *layout, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts, - const H5D_transfer_t xfer_mode, + const void *_xfer_parms, void *buf/*out*/); static herr_t H5S_all_fscat (H5F_t *f, const struct H5O_layout_t *layout, const struct H5O_pline_t *pline, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts, - const H5D_transfer_t xfer_mode, + const void *_xfer_parms, const void *buf); static size_t H5S_all_mgath (const void *_buf, size_t elmt_size, const H5S_t *mem_space, H5S_sel_iter_t *mem_iter, @@ -170,8 +171,9 @@ H5S_all_fgath (H5F_t *f, const struct H5O_layout_t *layout, const struct H5O_pline_t *pline, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts, - const H5D_transfer_t xfer_mode, void *_buf/*out*/) + const void *_xfer_parms, void *_buf/*out*/) { + const H5D_xfer_t *xfer_parms=(const H5D_xfer_t *)_xfer_parms; /* Coerce the type */ hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/ hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */ hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */ @@ -224,7 +226,7 @@ H5S_all_fgath (H5F_t *f, const struct H5O_layout_t *layout, * Gather from file. */ if (H5F_arr_read (f, layout, pline, efl, hsize, hsize, zero, file_offset, - xfer_mode, buf/*out*/)<0) { + xfer_parms->xfer_mode, buf/*out*/)<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_READERROR, 0, "read error"); } @@ -260,8 +262,9 @@ H5S_all_fscat (H5F_t *f, const struct H5O_layout_t *layout, const struct H5O_pline_t *pline, const struct H5O_efl_t *efl, size_t elmt_size, const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts, - const H5D_transfer_t xfer_mode, const void *_buf) + const void *_xfer_parms, const void *_buf) { + const H5D_xfer_t *xfer_parms=(const H5D_xfer_t *)_xfer_parms; /* Coerce the type */ hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of hyperslab */ hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */ hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero vector */ @@ -310,7 +313,7 @@ H5S_all_fscat (H5F_t *f, const struct H5O_layout_t *layout, * Scatter to file. */ if (H5F_arr_write (f, layout, pline, efl, hsize, hsize, zero, - file_offset, xfer_mode, buf)<0) { + file_offset, xfer_parms->xfer_mode, buf)<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error"); } |