summaryrefslogtreecommitdiffstats
path: root/src/H5Sprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-05-01 18:16:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-05-01 18:16:54 (GMT)
commit4b0ff36410e7b40d071e0d1adf6048b260375798 (patch)
tree1f59471c57d6e190f7a7d11b08798e85978d123c /src/H5Sprivate.h
parentecea60e95cd0ddd72ba975a79d5ca65805a44dd5 (diff)
downloadhdf5-4b0ff36410e7b40d071e0d1adf6048b260375798.zip
hdf5-4b0ff36410e7b40d071e0d1adf6048b260375798.tar.gz
hdf5-4b0ff36410e7b40d071e0d1adf6048b260375798.tar.bz2
[svn-r8460] Purpose:
Code optimization Description: Move the element size for the selection into the selection iterator instead of always passing it as a parameter. Also, eleminate another 64-bit multiply for "all" selections. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r--src/H5Sprivate.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index d350738..c3dc4e2 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -80,7 +80,8 @@ typedef struct {
/* "All" selection iteration container */
typedef struct {
- hsize_t offset; /* Next element to output */
+ hsize_t elmt_offset; /* Next element to output */
+ hsize_t byte_offset; /* Next byte to output */
} H5S_all_iter_t;
typedef struct H5S_sel_iter_t H5S_sel_iter_t;
@@ -106,6 +107,7 @@ struct H5S_sel_iter_t {
unsigned rank; /* Rank of dataspace the selection iterator is operating on */
hsize_t *dims; /* Dimensions of dataspace the selection is operating on */
hsize_t elmt_left; /* Number of elements left to iterate over */
+ size_t elmt_size; /* Size of elements to iterate over */
/* Information specific to each type of iterator */
union {
@@ -201,17 +203,17 @@ H5_DLL herr_t H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space,
H5_DLL herr_t H5S_select_fill(void *fill, size_t fill_size,
const H5S_t *space, void *buf);
H5_DLL herr_t H5S_select_fscat (H5F_t *f, struct H5O_layout_t *layout,
- const H5D_dcpl_cache_t *dcpl_cache, const union H5D_storage_t *store, size_t elmt_size,
+ const H5D_dcpl_cache_t *dcpl_cache, const union H5D_storage_t *store,
const H5S_t *file_space, H5S_sel_iter_t *file_iter, hsize_t nelmts,
const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, const void *_buf);
H5_DLL hsize_t H5S_select_fgath (H5F_t *f, const struct H5O_layout_t *layout,
- const H5D_dcpl_cache_t *dcpl_cache, const union H5D_storage_t *store, size_t elmt_size,
+ const H5D_dcpl_cache_t *dcpl_cache, const union H5D_storage_t *store,
const H5S_t *file_space, H5S_sel_iter_t *file_iter, hsize_t nelmts,
const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, void *buf);
-H5_DLL herr_t H5S_select_mscat (const void *_tscat_buf, size_t elmt_size,
+H5_DLL herr_t H5S_select_mscat (const void *_tscat_buf,
const H5S_t *space, H5S_sel_iter_t *iter, hsize_t nelmts,
const H5D_dxpl_cache_t *dxpl_cache, void *_buf/*out*/);
-H5_DLL hsize_t H5S_select_mgath (const void *_buf, size_t elmt_size,
+H5_DLL hsize_t H5S_select_mgath (const void *_buf,
const H5S_t *space, H5S_sel_iter_t *iter, hsize_t nelmts,
const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf/*out*/);
H5_DLL herr_t H5S_select_read(H5F_t *f, const struct H5O_layout_t *layout,