diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2019-11-08 22:49:12 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2019-11-13 18:54:13 (GMT) |
commit | db6eab893e5f027f0b535316e0e7a9abe9ff8619 (patch) | |
tree | 044b02dd11f91b58aff507addc39f50f26d30b3e /src/H5Spkg.h | |
parent | 9fd1143ffde30ef0dd61368667ea0ce85b280cd4 (diff) | |
download | hdf5-db6eab893e5f027f0b535316e0e7a9abe9ff8619.zip hdf5-db6eab893e5f027f0b535316e0e7a9abe9ff8619.tar.gz hdf5-db6eab893e5f027f0b535316e0e7a9abe9ff8619.tar.bz2 |
Implement public H5Sselect_project_intersection(). Updated internal
algorithm to (optionally) avoid sharing selection data structures.
Tested internal code (including with valgrind) by setting VDS code to
avoid sharing selection, has since been changed to share selection for
performance, so this code is not yet tested in regression tests. API
has not been tested.
Diffstat (limited to 'src/H5Spkg.h')
-rw-r--r-- | src/H5Spkg.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 278f08d..6809643 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -147,6 +147,21 @@ struct H5S_hyper_span_t { struct H5S_hyper_span_t *next; /* Pointer to next span in list */ }; +/* "Operation info" struct. Used to hold temporary information during copies, + * 'adjust', 'nelem', and 'rebuild' operations, and higher level algorithms that + * generate this information. */ +typedef struct H5S_hyper_op_info_t { + uint64_t op_gen; /* Generation of the scratch info */ + union { + struct H5S_hyper_span_info_t *copied; /* Pointer to already copied span tree */ + hsize_t nelmts; /* # of elements */ + hsize_t nblocks; /* # of blocks */ +#ifdef H5_HAVE_PARALLEL + MPI_Datatype down_type; /* MPI datatype for span tree */ +#endif /* H5_HAVE_PARALLEL */ + }u; +} H5S_hyper_op_info_t; + /* Information about a list of hyperslab spans in one dimension (typedef'd in H5Sprivate.h) */ struct H5S_hyper_span_info_t { unsigned count; /* Ref. count of number of spans which share this span */ @@ -165,17 +180,10 @@ struct H5S_hyper_span_info_t { hsize_t *low_bounds; /* The smallest element selected in each dimension */ hsize_t *high_bounds; /* The largest element selected in each dimension */ - /* "Operation generation" fields */ + /* "Operation info" fields */ /* (Used during copies, 'adjust', 'nelem', and 'rebuild' operations) */ - uint64_t op_gen; /* Generation of the scratch info */ - union { - struct H5S_hyper_span_info_t *copied; /* Pointer to already copied span tree */ - hsize_t nelmts; /* # of elements */ - hsize_t nblocks; /* # of blocks */ -#ifdef H5_HAVE_PARALLEL - MPI_Datatype down_type; /* MPI datatype for span tree */ -#endif /* H5_HAVE_PARALLEL */ - }u; + /* Currently the maximum number of simultaneous operations is 2 */ + H5S_hyper_op_info_t op_info[2]; struct H5S_hyper_span_t *head; /* Pointer to the first span of list of spans in the current dimension */ struct H5S_hyper_span_t *tail; /* Pointer to the last span of list of spans in the current dimension */ @@ -377,7 +385,8 @@ H5_DLL uint64_t H5S__hyper_get_op_gen(void); H5_DLL void H5S__hyper_rebuild(H5S_t *space); H5_DLL herr_t H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2); H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, - const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space); + const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space, + hbool_t share_space); /* Testing functions */ #ifdef H5S_TESTING |