diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-08 19:10:01 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-08 19:10:01 (GMT) |
commit | eb0f0ad28736bf01b57cfb65e41a6a43690f1774 (patch) | |
tree | cf1c7fc3df235bf40682039c447fe1b838b4373a /src/H5Sselect.c | |
parent | f646f060eab9019d4c6bbd661f856dad024457cb (diff) | |
download | hdf5-eb0f0ad28736bf01b57cfb65e41a6a43690f1774.zip hdf5-eb0f0ad28736bf01b57cfb65e41a6a43690f1774.tar.gz hdf5-eb0f0ad28736bf01b57cfb65e41a6a43690f1774.tar.bz2 |
[svn-r8497] Purpose:
Code optimization
Description:
Further reduce the number of copies we make of a hyperslab selection for
chunked I/O, especially when we are only going to throw the old selection away
for a new one.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.9 (sleipnir) w/parallel
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r-- | src/H5Sselect.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 2a017b1..d20c3a7 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -113,13 +113,18 @@ done: DESCRIPTION Copies all the selection information (include offset) from the source dataspace to the destination dataspace. + + If the SHARE_SELECTION flag is set, then the selection can be shared + between the source and destination dataspaces. (This should only occur in + situations where the destination dataspace will immediately change to a new + selection) GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_copy (H5S_t *dst, const H5S_t *src) +H5S_select_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) { herr_t ret_value=SUCCEED; /* return value */ @@ -132,7 +137,7 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src) /* Copy regular fields */ HDmemcpy(&dst->select,&src->select,sizeof(H5S_select_t)); -/* Need to copy order information still */ +/* Need to copy permutation order information still */ /* Copy offset information */ if(src->extent.u.simple.rank>0) { @@ -165,7 +170,7 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src) break; case H5S_SEL_HYPERSLABS: - ret_value=H5S_hyper_copy(dst,src); + ret_value=H5S_hyper_copy(dst,src,share_selection); break; default: |