diff options
Diffstat (limited to 'src/H5Sall.c')
-rw-r--r-- | src/H5Sall.c | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c index 7eab8b3..96ca1e5 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -38,11 +38,14 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); -static hssize_t H5S_all_serial_size(const H5S_t *space); -static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p); -static herr_t H5S_all_deserialize(H5S_t *space, const uint8_t **p); +static hssize_t H5S_all_serial_size(const H5F_t *f, const H5S_t *space); +static herr_t H5S_all_serialize(const H5F_t *f, const H5S_t *space, + uint8_t **p); +static herr_t H5S_all_deserialize(const H5F_t *f, H5S_t *space, + uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off); +static int H5S_all_unlim_dim(const H5S_t *space); static htri_t H5S_all_is_contiguous(const H5S_t *space); static htri_t H5S_all_is_single(const H5S_t *space); static htri_t H5S_all_is_regular(const H5S_t *space); @@ -74,6 +77,7 @@ const H5S_select_class_t H5S_sel_all[1] = {{ H5S_all_deserialize, H5S_all_bounds, H5S_all_offset, + H5S_all_unlim_dim, H5S_all_is_contiguous, H5S_all_is_single, H5S_all_is_regular, @@ -463,8 +467,9 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space) Determine the number of bytes needed to store the serialized "all" selection information. USAGE - hssize_t H5S_all_serial_size(space) - H5S_t *space; IN: Dataspace pointer to query + hssize_t H5S_all_serial_size(f, space) + H5F_t *f IN: File pointer + H5S_t *space; IN: Dataspace pointer to query RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -476,7 +481,8 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) +H5S_all_serial_size(const H5F_t H5_ATTR_UNUSED *f, + const H5S_t H5_ATTR_UNUSED *space) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -496,7 +502,8 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_all_serialize(space, p) + herr_t H5S_all_serialize(f, space, p) + H5F_t *f IN: File pointer const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of @@ -512,7 +519,8 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize (const H5S_t *space, uint8_t **p) +H5S_all_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, + uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -537,8 +545,11 @@ H5S_all_serialize (const H5S_t *space, uint8_t **p) Deserialize the current selection from a user-provided buffer. USAGE herr_t H5S_all_deserialize(space, p) + H5F_t *f IN: File pointer H5S_t *space; IN/OUT: Dataspace pointer to place selection into + uint32_t version IN: Selection version + uint8_t flags IN: Selection flags uint8 **p; OUT: Pointer to buffer holding serialized selection. Will be advanced to end of serialized selection. @@ -553,7 +564,9 @@ H5S_all_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_deserialize(H5S_t *space, const uint8_t H5_ATTR_UNUSED **p) +H5S_all_deserialize(const H5F_t H5_ATTR_UNUSED *f, H5S_t *space, + uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, + const uint8_t H5_ATTR_UNUSED **p) { herr_t ret_value = SUCCEED; /* return value */ @@ -659,6 +672,31 @@ H5S_all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset) /*-------------------------------------------------------------------------- NAME + H5S_all_unlim_dim + PURPOSE + Return unlimited dimension of selection, or -1 if none + USAGE + VDSINC + RETURNS + Unlimited dimension of selection, or -1 if none (never fails). + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static int +H5S_all_unlim_dim(const H5S_t H5_ATTR_UNUSED *space) +{ + FUNC_ENTER_NOAPI_NOERR + + FUNC_LEAVE_NOAPI(-1) +} /* end H5S_all_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_all_is_contiguous PURPOSE Check if a "all" selection is contiguous within the dataspace extent. @@ -976,6 +1014,7 @@ H5S_all_get_seq_list(const H5S_t H5_ATTR_UNUSED *space, unsigned H5_ATTR_UNUSED /* Determine the actual number of elements to use */ H5_CHECK_OVERFLOW(iter->elmt_left,hsize_t,size_t); elem_used=MIN(maxelem,(size_t)iter->elmt_left); + HDassert(elem_used > 0); /* Compute the offset in the dataset */ off[0]=iter->u.all.byte_offset; |