summaryrefslogtreecommitdiffstats
path: root/src/H5Spkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-07-24 18:56:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-07-24 18:56:48 (GMT)
commit40df66ebd027351e48eea8b7499490c9654d3943 (patch)
tree9dd8b9170bec792e840e2b350ca48153cd45ce88 /src/H5Spkg.h
parentc968525b29ce8cee8e842f6a7a1bbd78acc6b63f (diff)
downloadhdf5-40df66ebd027351e48eea8b7499490c9654d3943.zip
hdf5-40df66ebd027351e48eea8b7499490c9654d3943.tar.gz
hdf5-40df66ebd027351e48eea8b7499490c9654d3943.tar.bz2
[svn-r5834] Purpose:
Large code cleanup/re-write Description: This is phase 1 of the data I/O re-architecture, with the following changes: - Changed the selection drivers to not actually do any I/O, they only generate the sequences of offset/length pairs needed for the I/O (or memory access, in the case of iterating or filling a selection in a memory buffer) - Wrote more abstract I/O routines which get the sequence of offset/ length pairs for each selection and access perform the I/O or memory access. Benefits of this change include: - Removed ~3400 lines of quite redundant code, with corresponding reduction in the size of library binary. - Any selection can now directly access memory when performing I/O, if no type conversions are required, instead of just "regular" hyperslab and 'all' selections, which speeds up I/O. - Sped up I/O for hyperslab selections which have contiguous lower dimensions by "flattening" them out into lesser dimensional objects for the I/O. No file format or API changes were necessary for this change. The next phase will be to create a "selection driver" for each type of selection, allowing each type of selection to directly call certain methods that only apply to that type of selection, instead of passing through dozens of functions which have switch statements to call the appropriate method for each selection type. This will also reduce the amount of code in the library and speed things up a bit more. Phase 3 will involve generating an MPI datatype for all types of selections, instead of only "regular" hyperslab and 'all' selections. This will allow collective parallel I/O for all I/O operations which don't require type conversions. It will also open up the door for allowing collective I/O on datasets which require type conversion. Phase 4 will involve changing the access pattern to deal with chunked datasets in a more optimal way (in serial). Phase 5 will deal with accessing chunked datasets more optimally for collective parallel I/O operations. Platforms tested: FreeBSD 4.6 (sleipnir) w/ parallel & C++ and IRIX64 6.5 (modi4) w/parallel
Diffstat (limited to 'src/H5Spkg.h')
-rw-r--r--src/H5Spkg.h49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index 1ab7dd6..d31d894 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -72,12 +72,12 @@ struct H5S_hyper_span_info_t {
};
/* Information about one dimension in a hyperslab selection */
-typedef struct {
+struct H5S_hyper_dim_t {
hssize_t start;
hsize_t stride;
hsize_t count;
hsize_t block;
-} H5S_hyper_dim_t;
+};
/* Information about new-style hyperslab selection */
typedef struct {
@@ -117,10 +117,12 @@ struct H5S_t {
__DLL__ herr_t H5S_close_simple(H5S_simple_t *simple);
__DLL__ herr_t H5S_release_simple(H5S_simple_t *simple);
__DLL__ herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src);
-__DLL__ herr_t H5S_register(H5S_sel_type cls, const H5S_fconv_t *fconv,
- const H5S_mconv_t *mconv);
/* Point select functions */
+__DLL__ herr_t H5S_point_init (const H5S_t *space, size_t elmt_size,
+ H5S_sel_iter_t *iter);
+__DLL__ hsize_t H5S_point_favail (const H5S_t *space, const H5S_sel_iter_t *iter,
+ hsize_t max);
__DLL__ herr_t H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem,
const hssize_t **coord);
__DLL__ herr_t H5S_point_release(H5S_t *space);
@@ -136,33 +138,29 @@ __DLL__ htri_t H5S_point_select_single(const H5S_t *space);
__DLL__ htri_t H5S_point_select_regular(const H5S_t *space);
__DLL__ herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op,
size_t num_elem, const hssize_t **coord);
-__DLL__ herr_t H5S_point_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op, void *operator_data);
-__DLL__ herr_t H5S_point_select_fill(const void *fill, size_t fill_size,
- const H5S_t *space, void *buf);
+__DLL__ herr_t H5S_point_select_get_seq_list(unsigned flags, const H5S_t *space,H5S_sel_iter_t *iter,
+ size_t elem_size, size_t maxseq, size_t maxbytes,
+ size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len);
/* "All" select functions */
+__DLL__ herr_t H5S_all_init (const H5S_t *space, size_t elmt_size,
+ H5S_sel_iter_t *iter);
+__DLL__ hsize_t H5S_all_favail (const H5S_t *space, const H5S_sel_iter_t *iter,
+ hsize_t max);
__DLL__ herr_t H5S_all_release(H5S_t *space);
__DLL__ hsize_t H5S_all_npoints(const H5S_t *space);
__DLL__ herr_t H5S_all_select_serialize(const H5S_t *space, uint8_t *buf);
__DLL__ herr_t H5S_all_select_deserialize(H5S_t *space, const uint8_t *buf);
__DLL__ herr_t H5S_all_bounds(H5S_t *space, hsize_t *start, hsize_t *end);
-__DLL__ herr_t H5S_all_read(H5F_t *f, const struct H5O_layout_t *layout,
- H5P_genplist_t *dc_plist, size_t elmt_size,
- const H5S_t *file_space, const H5S_t *mem_space,
- hid_t dxpl_id, void *buf/*out*/);
-__DLL__ herr_t H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout,
- H5P_genplist_t *dc_plist, size_t elmt_size,
- const H5S_t *file_space, const H5S_t *mem_space,
- hid_t dxpl_id, const void *buf);
-__DLL__ herr_t H5S_all_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op, void *operator_data);
-__DLL__ herr_t H5S_all_select_fill(const void *fill, size_t fill_size,
- const H5S_t *space, void *buf);
-__DLL__ htri_t H5S_all_opt_possible(const H5S_t *mem_space,
- const H5S_t *file_space, const unsigned flags);
+__DLL__ herr_t H5S_all_select_get_seq_list(unsigned flags, const H5S_t *space,H5S_sel_iter_t *iter,
+ size_t elem_size, size_t maxseq, size_t maxbytes,
+ size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len);
/* Hyperslab selection functions */
+__DLL__ herr_t H5S_hyper_init (const H5S_t *space, size_t elmt_size,
+ H5S_sel_iter_t *iter);
+__DLL__ hsize_t H5S_hyper_favail (const H5S_t *space, const H5S_sel_iter_t *iter,
+ hsize_t max);
__DLL__ herr_t H5S_hyper_release(H5S_t *space);
__DLL__ herr_t H5S_hyper_sel_iter_release(H5S_sel_iter_t *sel_iter);
__DLL__ hsize_t H5S_hyper_npoints(const H5S_t *space);
@@ -177,10 +175,9 @@ __DLL__ herr_t H5S_hyper_bounds(H5S_t *space, hsize_t *start, hsize_t *end);
__DLL__ htri_t H5S_hyper_select_contiguous(const H5S_t *space);
__DLL__ htri_t H5S_hyper_select_single(const H5S_t *space);
__DLL__ htri_t H5S_hyper_select_regular(const H5S_t *space);
-__DLL__ herr_t H5S_hyper_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op, void *operator_data);
-__DLL__ herr_t H5S_hyper_select_fill(const void *fill, size_t fill_size,
- const H5S_t *space, void *buf);
+__DLL__ herr_t H5S_hyper_select_get_seq_list(unsigned flags, const H5S_t *space,H5S_sel_iter_t *iter,
+ size_t elem_size, size_t maxseq, size_t maxbytes,
+ size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len);
/* "None" selection functions */
__DLL__ herr_t H5S_select_none(H5S_t *space);