summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 062b2a1..7ef9bca 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -486,6 +486,50 @@ done:
/*--------------------------------------------------------------------------
NAME
+ H5Sselect_all
+ PURPOSE
+ Specify the the entire extent is selected
+ USAGE
+ herr_t H5Sselect_elements(dsid)
+ hid_t dsid; IN: Dataspace ID of selection to modify
+ RETURNS
+ SUCCEED/FAIL
+ DESCRIPTION
+ This function selects the entire extent for a dataspace.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+herr_t H5Sselect_all (hid_t spaceid)
+{
+ H5S_t *space = NULL; /* Dataspace to modify selection of */
+ herr_t ret_value=FAIL; /* return value */
+
+ FUNC_ENTER (H5Sselect_all, FAIL);
+
+ /* Check args */
+ if (H5_DATASPACE != H5I_group(spaceid) ||
+ NULL == (space=H5I_object(spaceid))) {
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ }
+
+ /* Remove current selection first */
+ if(H5S_select_release(space)<0) {
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL,
+ "can't release hyperslab");
+ } /* end if */
+
+ /* Set selection type */
+ space->select.type=H5S_SEL_ALL;
+ ret_value=SUCCEED;
+
+done:
+ FUNC_LEAVE (ret_value);
+} /* H5Sselect_all() */
+
+/*--------------------------------------------------------------------------
+ NAME
H5Sselect_npoints
PURPOSE
Get the number of elements in current selection