summaryrefslogtreecommitdiffstats
path: root/src/H5Sall.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-06-13 06:23:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-06-13 06:23:57 (GMT)
commit4ccb865c70f977a4a97d75df3d6e792c8cbdfdd8 (patch)
tree860f585f1589250b03aec29371acb13ebbf2e022 /src/H5Sall.c
parentc2bc22d51cdf528c9b04ec115ac22c7e79fd7c6d (diff)
downloadhdf5-4ccb865c70f977a4a97d75df3d6e792c8cbdfdd8.zip
hdf5-4ccb865c70f977a4a97d75df3d6e792c8cbdfdd8.tar.gz
hdf5-4ccb865c70f977a4a97d75df3d6e792c8cbdfdd8.tar.bz2
[svn-r25273] Description:
Bring in Chao/Neil/my changes to optimize hyperslab selection operations further, along with 3 new public API routines: H5Scombine_hyperslab(), H5Sselect_select() and H5Scombine_select(), along with many minor cleanups to the code and fixing a few compiler warnings. Tested on: Mac OSX/64 10.9.3 w/gcc 4.9.x and parallel w/OpenMPI (h5commttest forthcoming)
Diffstat (limited to 'src/H5Sall.c')
-rw-r--r--src/H5Sall.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 24caad2..0b7120c 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -17,7 +17,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, June 16, 1998
*
- * Purpose: "All" selection data space I/O functions.
+ * Purpose: "All" selection dataspace I/O functions.
*/
#define H5S_PACKAGE /*suppress error about including H5Spkg */
@@ -413,6 +413,8 @@ H5S_all_release(H5S_t *space)
static herr_t
H5S_all_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection)
{
+ unsigned u; /* Local index variable */
+
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(src);
@@ -421,6 +423,12 @@ H5S_all_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection
/* Set number of elements in selection */
dst->select.num_elem = (hsize_t)H5S_GET_EXTENT_NPOINTS(dst);
+ /* Update the bound box */
+ for(u = 0; u < dst->extent.rank; u++) {
+ dst->select.low_bounds[u] = 0;
+ dst->select.high_bounds[u] = dst->extent.size[u] - 1;
+ } /* end for */
+
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_all_copy() */
@@ -852,6 +860,7 @@ done:
herr_t
H5S_select_all(H5S_t *space, hbool_t rel_prev)
{
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -867,6 +876,12 @@ H5S_select_all(H5S_t *space, hbool_t rel_prev)
/* Set number of elements in selection */
space->select.num_elem = (hsize_t)H5S_GET_EXTENT_NPOINTS(space);
+ /* Update the bound box */
+ for(u = 0; u < space->extent.rank; u++) {
+ space->select.low_bounds[u] = 0;
+ space->select.high_bounds[u] = space->extent.size[u] - 1;
+ } /* end for */
+
/* Set selection type */
space->select.type = H5S_sel_all;
@@ -903,7 +918,7 @@ H5Sselect_all(hid_t spaceid)
/* Check args */
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Call internal routine to do the work */
if(H5S_select_all(space, TRUE) < 0)