summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-04-29 03:22:55 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-04-29 03:22:55 (GMT)
commita9b2e360653988b417f390e0a66d486fa775f3a2 (patch)
treea80cb2c83dab88061999f05911ae6b98ea3f4cdc /src/H5S.c
parentf3f74731619798b8e802987b01266348f1fbc027 (diff)
downloadhdf5-a9b2e360653988b417f390e0a66d486fa775f3a2.zip
hdf5-a9b2e360653988b417f390e0a66d486fa775f3a2.tar.gz
hdf5-a9b2e360653988b417f390e0a66d486fa775f3a2.tar.bz2
[svn-r26962] Add support for unlimited selections to VDS code.
Not tested (except for percival-unlim example) Fix percival-unlim example Other bug fixes/cleanup Tested: Fedora 64
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/H5S.c b/src/H5S.c
index e24879c..045ab51 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -522,7 +522,7 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src)
/* If the selection is 'hyper', update the selection due to changed extent
*/
if(H5S_GET_SELECT_TYPE(dst) == H5S_SEL_HYPERSLABS)
- if(H5S__hyper_update_extent_offset(dst) < 0)
+ if(H5S_hyper_clip_to_extent(dst) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab")
done:
@@ -1363,7 +1363,7 @@ H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
/* If the selection is 'hyper', update the selection due to changed
* extent */
if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS)
- if(H5S__hyper_update_extent_offset(space) < 0)
+ if(H5S_hyper_clip_to_extent(space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab")
done:
@@ -1883,7 +1883,14 @@ done:
/*-------------------------------------------------------------------------
* Function: H5S_set_extent
*
- * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend
+ * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend.
+ *
+ * Note that this function does *not* clip unlimited
+ * selections, because it is not currently necessary to do
+ * that anywhere this function is called. If this becomes
+ * necessary (if the selection could be unlimited and the
+ * clip size is not being handled separately), this function
+ * must be updated to (optionally) clip the selection.
*
* Return: Success: Non-negative
* Failure: Negative
@@ -1966,6 +1973,13 @@ H5S_has_extent(const H5S_t *ds)
*
* Purpose: Modify the dimensions of a dataspace. Based on H5S_extend
*
+ * Note that this function does *not* clip unlimited
+ * selections, because it is not currently necessary to do
+ * that anywhere this function is called. If this becomes
+ * necessary (if the selection could be unlimited and the
+ * clip size is not being handled separately), this function
+ * must be updated to (optionally) clip the selection.
+ *
* Return: Success: Non-negative
* Failure: Negative
*
@@ -1999,12 +2013,6 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size)
if(H5S_select_all(space, FALSE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection")
- /* If the selection is 'hyper', update the selection due to changed
- * extent */
- if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS)
- if(H5S__hyper_update_extent_offset(space) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab")
-
/* Mark the dataspace as no longer shared if it was before */
if(H5O_msg_reset_share(H5O_SDSPACE_ID, space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace")