diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 14:31:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 14:31:56 (GMT) |
commit | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch) | |
tree | 44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /src/H5Shyper.c | |
parent | 622fcbd13881fbc58bbeaed3062583b759f5e864 (diff) | |
download | hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.zip hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.gz hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.bz2 |
Rename HDassert() to assert() (#3191)
* Change HDassert to assert
* Fix bin/make_err
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r-- | src/H5Shyper.c | 858 |
1 files changed, 429 insertions, 429 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 376426d..a208ed5 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -405,7 +405,7 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig /* get the actual tail from head */ cur_elem = span_lst->head; - HDassert(cur_elem); /* at least 1 element */ + assert(cur_elem); /* at least 1 element */ while (cur_elem) { actual_tail = cur_elem; cur_elem = cur_elem->next; @@ -472,7 +472,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space) FUNC_ENTER_PACKAGE_NOERR - HDassert(hslab); + assert(hslab); HDfprintf(f, "=======================\n"); HDfprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims, @@ -574,9 +574,9 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); - HDassert(iter); - HDassert(space->select.sel_info.hslab->unlim_dim < 0); + assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); + assert(iter); + assert(space->select.sel_info.hslab->unlim_dim < 0); /* Initialize the hyperslab iterator's rank */ iter->u.hyp.iter_rank = 0; @@ -640,7 +640,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter) for (i = (int)rank - 1, acc = 1; i >= 0; i--) { if (tdiminfo[i].block == mem_size[i] && i > 0) { /* "Flatten" this dimension */ - HDassert(tdiminfo[i].start == 0); + assert(tdiminfo[i].start == 0); acc *= mem_size[i]; /* Indicate that the dimension was flattened */ @@ -732,7 +732,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter) } /* end if */ else { /* Share the source dataspace's span tree by incrementing the reference count on it */ - HDassert(space->select.sel_info.hslab->span_lst); + assert(space->select.sel_info.hslab->span_lst); iter->u.hyp.spans = space->select.sel_info.hslab->span_lst; iter->u.hyp.spans->count++; } /* end else */ @@ -741,8 +741,8 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter) spans = iter->u.hyp.spans; for (u = 0; u < rank; u++) { /* Set the pointers to the initial span in each dimension */ - HDassert(spans); - HDassert(spans->head); + assert(spans); + assert(spans->head); /* Set the pointer to the first span in the list for this node */ iter->u.hyp.span[u] = spans->head; @@ -803,8 +803,8 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); - HDassert(coords); + assert(iter); + assert(coords); /* Copy the offset of the current point */ @@ -833,7 +833,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) u = 0; /* Sanity check */ - HDassert(v >= 0); + assert(v >= 0); /* Compute the coords for the flattened dimensions */ H5VM_array_calc(iter->u.hyp.off[v], (unsigned)((begin - u) + 1), &(iter->dims[u]), @@ -847,7 +847,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) /* Walk up through as many non-flattened dimensions as possible */ while (u >= 0 && !iter->u.hyp.flattened[u]) { /* Sanity check */ - HDassert(v >= 0); + assert(v >= 0); /* Copy the coordinate */ coords[u] = iter->u.hyp.off[v]; @@ -858,7 +858,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) } /* end while */ } /* end else */ } /* end while */ - HDassert(v < 0); + assert(v < 0); } /* end if */ else H5MM_memcpy(coords, iter->u.hyp.off, sizeof(hsize_t) * iter->rank); @@ -893,9 +893,9 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); - HDassert(start); - HDassert(end); + assert(iter); + assert(start); + assert(end); /* Copy the offset of the current point */ @@ -936,7 +936,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); + assert(iter); FUNC_LEAVE_NOAPI(iter->elmt_left) } /* end H5S__hyper_iter_nelmts() */ @@ -967,7 +967,7 @@ H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); + assert(iter); /* Check for a single "regular" hyperslab */ if (iter->u.hyp.diminfo_valid) { @@ -1179,9 +1179,9 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) if (curr_dim >= 0) { /* Walk back down the iterator positions, resetting them */ while (curr_dim < fast_dim) { - HDassert(curr_span); - HDassert(curr_span->down); - HDassert(curr_span->down->head); + assert(curr_span); + assert(curr_span->down); + assert(curr_span->down->head); /* Increment current dimension */ curr_dim++; @@ -1197,7 +1197,7 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) } /* end while */ /* Verify that the curr_span points to the fastest dim */ - HDassert(curr_span == ispan[fast_dim]); + assert(curr_span == ispan[fast_dim]); } /* end if */ } /* end while */ } /* end else */ @@ -1356,9 +1356,9 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter) if (curr_dim >= 0) { /* Walk back down the iterator positions, resetting them */ while (curr_dim < fast_dim) { - HDassert(curr_span); - HDassert(curr_span->down); - HDassert(curr_span->down->head); + assert(curr_span); + assert(curr_span->down); + assert(curr_span->down->head); /* Increment current dimension */ curr_dim++; @@ -1374,7 +1374,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter) } /* end while */ /* Verify that the curr_span points to the fastest dim */ - HDassert(curr_span == ispan[fast_dim]); + assert(curr_span == ispan[fast_dim]); } /* end if */ } /* end else */ @@ -1438,13 +1438,13 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max FUNC_ENTER_PACKAGE /* Check args */ - HDassert(iter); - HDassert(maxseq > 0); - HDassert(maxelem > 0); - HDassert(nseq); - HDassert(nelem); - HDassert(off); - HDassert(len); + assert(iter); + assert(maxseq > 0); + assert(maxelem > 0); + assert(nseq); + assert(nelem); + assert(off); + assert(len); /* Set the rank of the fastest changing dimension */ ndims = iter->rank; @@ -1517,7 +1517,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Check if we are still within the span */ if (abs_arr[fast_dim] <= curr_span->high) { /* Sanity check */ - HDassert(ispan[fast_dim] == curr_span); + assert(ispan[fast_dim] == curr_span); /* Update byte offset */ loc_arr[fast_dim] += span_size; @@ -1594,9 +1594,9 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max if (curr_dim >= 0) { /* Walk back down the iterator positions, resetting them */ while ((unsigned)curr_dim < fast_dim) { - HDassert(curr_span); - HDassert(curr_span->down); - HDassert(curr_span->down->head); + assert(curr_span); + assert(curr_span->down); + assert(curr_span->down->head); /* Increment current dimension */ curr_dim++; @@ -1616,7 +1616,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max } /* end while */ /* Verify that the curr_span points to the fastest dim */ - HDassert(curr_span == ispan[fast_dim]); + assert(curr_span == ispan[fast_dim]); /* Reset the buffer offset */ for (u = 0, loc_off = 0; u < ndims; u++) @@ -1624,7 +1624,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max } /* end else */ else /* We had better be done with I/O or bad things are going to happen... */ - HDassert(io_elmts_left == 0); + assert(io_elmts_left == 0); } /* end if */ } /* end if */ @@ -1633,7 +1633,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max H5S_hyper_span_t *prev_span; /* Previous hyperslab span node */ /* Sanity check */ - HDassert(curr_span); + assert(curr_span); /* Set to current span, so the first adjustment to loc_off is 0 */ prev_span = curr_span; @@ -1796,15 +1796,15 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Check if we are finished with the spans in the tree */ if (curr_dim < 0) { /* We had better be done with I/O or bad things are going to happen... */ - HDassert(io_elmts_left == 0); + assert(io_elmts_left == 0); break; } /* end if */ else { /* Walk back down the iterator positions, resetting them */ while ((unsigned)curr_dim < fast_dim) { - HDassert(curr_span); - HDassert(curr_span->down); - HDassert(curr_span->down->head); + assert(curr_span); + assert(curr_span->down); + assert(curr_span->down->head); /* Increment current dimension to the next dimension down */ curr_dim++; @@ -1824,7 +1824,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max } /* end while */ /* Verify that the curr_span points to the fastest dim */ - HDassert(curr_span == ispan[fast_dim]); + assert(curr_span == ispan[fast_dim]); } /* end else */ /* Reset the buffer offset */ @@ -1911,13 +1911,13 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); - HDassert(maxseq > 0); - HDassert(maxelem > 0); - HDassert(nseq); - HDassert(nelem); - HDassert(off); - HDassert(len); + assert(iter); + assert(maxseq > 0); + assert(maxelem > 0); + assert(nseq); + assert(nelem); + assert(off); + assert(len); /* Set the local copy of the diminfo pointer */ tdiminfo = iter->u.hyp.diminfo; @@ -1954,8 +1954,8 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max io_left = MIN((size_t)iter->elmt_left, maxelem); /* Sanity check that there aren't any "remainder" sequences in process */ - HDassert(!((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 || - ((iter->u.hyp.off[fast_dim] != tdiminfo[fast_dim].start) && tdiminfo[fast_dim].count == 1))); + assert(!((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 || + ((iter->u.hyp.off[fast_dim] != tdiminfo[fast_dim].start) && tdiminfo[fast_dim].count == 1))); /* We've cleared the "remainder" of the previous fastest dimension * sequence before calling this routine, so we must be at the beginning of @@ -2138,7 +2138,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max duffs_index = (fast_dim_count + 7) / 8; switch (fast_dim_count % 8) { default: - HDassert(0 && "This Should never be executed!"); + assert(0 && "This Should never be executed!"); break; case 0: do { @@ -2274,7 +2274,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max } /* end if */ /* don't bother checking slower dimensions */ - HDassert(io_left == 0 || curr_seq == maxseq); + assert(io_left == 0 || curr_seq == maxseq); } /* end if */ /* Update the iterator */ @@ -2350,13 +2350,13 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); - HDassert(maxseq > 0); - HDassert(maxelem > 0); - HDassert(nseq); - HDassert(nelem); - HDassert(off); - HDassert(len); + assert(iter); + assert(maxseq > 0); + assert(maxelem > 0); + assert(nseq); + assert(nelem); + assert(off); + assert(len); /* Set a local copy of the diminfo pointer */ tdiminfo = iter->u.hyp.diminfo; @@ -2429,8 +2429,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t /* Check for 1-dim selection */ if (0 == fast_dim) { /* Sanity checks */ - HDassert(1 == tot_blk_count); - HDassert(io_left == actual_elem); + assert(1 == tot_blk_count); + assert(io_left == actual_elem); /* Store the sequence information */ *off++ = loc; @@ -2547,8 +2547,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t /* Compute elements left */ elmt_remainder = io_left - (tot_blk_count * actual_elem); - HDassert(elmt_remainder < fast_dim_block); - HDassert(elmt_remainder > 0); + assert(elmt_remainder < fast_dim_block); + assert(elmt_remainder > 0); /* Store the sequence information */ *off++ = loc; @@ -2568,8 +2568,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t } /* end if */ /* Sanity check */ - HDassert(*nseq > 0); - HDassert(*nelem > 0); + assert(*nseq > 0); + assert(*nelem > 0); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_get_seq_list_single() */ @@ -2613,14 +2613,14 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(iter); - HDassert(iter->elmt_left > 0); - HDassert(maxseq > 0); - HDassert(maxelem > 0); - HDassert(nseq); - HDassert(nelem); - HDassert(off); - HDassert(len); + assert(iter); + assert(iter->elmt_left > 0); + assert(maxseq > 0); + assert(maxelem > 0); + assert(nseq); + assert(nelem); + assert(off); + assert(len); /* Check for the special case of just one H5Sselect_hyperslab call made */ if (iter->u.hyp.diminfo_valid) { @@ -2766,7 +2766,7 @@ H5S__hyper_iter_release(H5S_sel_iter_t *iter) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(iter); + assert(iter); /* Free the copy of the hyperslab selection span tree */ if (iter->u.hyp.spans != NULL) @@ -2850,8 +2850,8 @@ H5S__hyper_new_span_info(unsigned rank) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(rank > 0); - HDassert(rank <= H5S_MAX_RANK); + assert(rank > 0); + assert(rank <= H5S_MAX_RANK); /* Allocate a new span info node */ if (NULL == (ret_value = (H5S_hyper_span_info_t *)H5FL_ARR_CALLOC(hbounds_t, rank * 2))) @@ -2897,7 +2897,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(spans); + assert(spans); /* Check if the span tree was already copied */ if (spans->op_info[op_info_i].op_gen == op_gen) { @@ -2988,7 +2988,7 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(spans); + assert(spans); /* Acquire an operation generation value for this operation */ op_gen = H5S__hyper_get_op_gen(); @@ -3052,8 +3052,8 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp span2 = span_info2->head; /* Sanity checking */ - HDassert(span1); - HDassert(span2); + assert(span1); + assert(span2); /* infinite loop which must be broken out of */ while (1) { @@ -3185,7 +3185,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(span); + assert(span); /* Decrement the reference count of the 'down spans', freeing them if appropriate */ if (span->down != NULL) @@ -3234,8 +3234,8 @@ H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(src); - HDassert(dst); + assert(src); + assert(dst); /* Allocate space for the hyperslab selection information */ if (NULL == (dst->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) @@ -3303,7 +3303,7 @@ H5S__hyper_is_valid(const H5S_t *space) FUNC_ENTER_PACKAGE_NOERR - HDassert(space); + assert(space); /* Check for unlimited selection */ if (space->select.sel_info.hslab->unlim_dim >= 0) @@ -3359,7 +3359,7 @@ H5S__hyper_span_nblocks_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i, FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(spans); + assert(spans); /* Check if the span tree was already counted */ if (spans->op_info[op_info_i].op_gen == op_gen) @@ -3463,8 +3463,8 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref) FUNC_ENTER_PACKAGE_NOERR - HDassert(space); - HDassert(space->select.sel_info.hslab->unlim_dim < 0); + assert(space); + assert(space->select.sel_info.hslab->unlim_dim < 0); /* Check for a "regular" hyperslab selection */ /* (No need to rebuild the dimension info yet -QAK) */ @@ -3705,7 +3705,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver } /* end if */ else { hsize_t max_size = block_count; - HDassert(space->select.sel_info.hslab->unlim_dim < 0); + assert(space->select.sel_info.hslab->unlim_dim < 0); /* Find max for block_count and bounds_end[] */ for (u = 0; u < space->extent.rank; u++) @@ -3755,7 +3755,7 @@ H5S__hyper_serial_size(H5S_t *space) FUNC_ENTER_PACKAGE - HDassert(space); + assert(space); /* Determine the number of blocks */ if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */ @@ -3797,12 +3797,12 @@ H5S__hyper_serial_size(H5S_t *space) * (4 (start/stride/count/block) * <enc_size (8 bytes)> * <rank>) = * 17 + (4 * 8 * rank) bytes */ - HDassert(enc_size == 8); + assert(enc_size == 8); ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)8 * (hssize_t)space->extent.rank); } else { - HDassert(version == H5S_HYPER_VERSION_1); - HDassert(enc_size == 4); + assert(version == H5S_HYPER_VERSION_1); + assert(enc_size == 4); /* Version 1 */ /* Basic number of bytes required to serialize hyperslab selection: * <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> + @@ -3852,11 +3852,11 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start, FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(spans); - HDassert(start); - HDassert(end); - HDassert(rank < H5S_MAX_RANK); - HDassert(p && pp); + assert(spans); + assert(start); + assert(end); + assert(rank < H5S_MAX_RANK); + assert(p && pp); /* Walk through the list of spans, recursing or outputting them */ curr = spans->head; @@ -3924,7 +3924,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start, break; default: - HDassert(0 && "Unknown enc size?!?"); + assert(0 && "Unknown enc size?!?"); } /* end switch */ } /* end else */ @@ -3985,10 +3985,10 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(space); - HDassert(p); + assert(space); + assert(p); pp = (*p); - HDassert(pp); + assert(pp); /* Set some convenience values */ ndims = space->extent.rank; @@ -4030,13 +4030,13 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) if (is_regular) { if (version >= H5S_HYPER_VERSION_2) { - HDassert(H5S_UNLIMITED == HSIZE_UNDEF); + assert(H5S_UNLIMITED == HSIZE_UNDEF); /* Iterate over dimensions */ /* Encode start/stride/block/count */ switch (enc_size) { case H5S_SELECT_INFO_ENC_SIZE_2: - HDassert(version == H5S_HYPER_VERSION_3); + assert(version == H5S_HYPER_VERSION_3); for (u = 0; u < space->extent.rank; u++) { UINT16ENCODE(pp, diminfo[u].start); UINT16ENCODE(pp, diminfo[u].stride); @@ -4052,7 +4052,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) break; case H5S_SELECT_INFO_ENC_SIZE_4: - HDassert(version == H5S_HYPER_VERSION_3); + assert(version == H5S_HYPER_VERSION_3); for (u = 0; u < space->extent.rank; u++) { UINT32ENCODE(pp, diminfo[u].start); UINT32ENCODE(pp, diminfo[u].stride); @@ -4068,7 +4068,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) break; case H5S_SELECT_INFO_ENC_SIZE_8: - HDassert(version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3); + assert(version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3); for (u = 0; u < space->extent.rank; u++) { UINT64ENCODE(pp, diminfo[u].start); UINT64ENCODE(pp, diminfo[u].stride); @@ -4091,7 +4091,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) } /* end switch */ } /* end if */ else { - HDassert(version == H5S_HYPER_VERSION_1); + assert(version == H5S_HYPER_VERSION_1); /* Set some convenience values */ fast_dim = ndims - 1; @@ -4172,19 +4172,19 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) /* Encode number of hyperslabs */ switch (enc_size) { case H5S_SELECT_INFO_ENC_SIZE_2: - HDassert(version == H5S_HYPER_VERSION_3); + assert(version == H5S_HYPER_VERSION_3); H5_CHECK_OVERFLOW(block_count, hsize_t, uint16_t); UINT16ENCODE(pp, (uint16_t)block_count); break; case H5S_SELECT_INFO_ENC_SIZE_4: - HDassert(version == H5S_HYPER_VERSION_1 || version == H5S_HYPER_VERSION_3); + assert(version == H5S_HYPER_VERSION_1 || version == H5S_HYPER_VERSION_3); H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); UINT32ENCODE(pp, (uint32_t)block_count); break; case H5S_SELECT_INFO_ENC_SIZE_8: - HDassert(version == H5S_HYPER_VERSION_3); + assert(version == H5S_HYPER_VERSION_3); UINT64ENCODE(pp, block_count); break; @@ -4257,9 +4257,9 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb FUNC_ENTER_PACKAGE /* Check args */ - HDassert(p); + assert(p); pp = (*p); - HDassert(pp); + assert(pp); /* As part of the efforts to push all selection-type specific coding to the callbacks, the coding for the allocation of a null dataspace @@ -4341,8 +4341,8 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb hsize_t count[H5S_MAX_RANK]; /* Hyperslab count information */ /* Sanity checks */ - HDassert(H5S_UNLIMITED == HSIZE_UNDEF); - HDassert(version >= H5S_HYPER_VERSION_2); + assert(H5S_UNLIMITED == HSIZE_UNDEF); + assert(version >= H5S_HYPER_VERSION_2); /* Decode start/stride/block/count */ switch (enc_size) { @@ -4566,13 +4566,13 @@ H5S__hyper_span_blocklist(const H5S_hyper_span_info_t *spans, hsize_t start[], h FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(spans); - HDassert(rank < H5S_MAX_RANK); - HDassert(start); - HDassert(end); - HDassert(startblock); - HDassert(numblocks && *numblocks > 0); - HDassert(buf && *buf); + assert(spans); + assert(rank < H5S_MAX_RANK); + assert(start); + assert(end); + assert(startblock); + assert(numblocks && *numblocks > 0); + assert(buf && *buf); /* Walk through the list of spans, recursing or outputting them */ curr = spans->head; @@ -4663,9 +4663,9 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo FUNC_ENTER_PACKAGE_NOERR - HDassert(space); - HDassert(buf); - HDassert(space->select.sel_info.hslab->unlim_dim < 0); + assert(space); + assert(buf); + assert(space->select.sel_info.hslab->unlim_dim < 0); /* Attempt to rebuild diminfo if it is invalid and has not been confirmed * to be impossible. @@ -4738,7 +4738,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo /* Iterate over the blocks in the fastest dimension */ while (tmp_count[fast_dim] > 0 && numblocks > 0) { /* Sanity check */ - HDassert(startblock == 0); + assert(startblock == 0); /* Copy the starting location */ H5MM_memcpy(buf, offset, sizeof(hsize_t) * ndims); @@ -4902,9 +4902,9 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(space); - HDassert(start); - HDassert(end); + assert(space); + assert(start); + assert(end); /* Check which set of low & high bounds we should be using */ if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { @@ -4923,7 +4923,7 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end) /* Loop over dimensions */ for (u = 0; u < space->extent.rank; u++) { /* Sanity check */ - HDassert(low_bounds[u] <= high_bounds[u]); + assert(low_bounds[u] <= high_bounds[u]); /* Check for offset moving selection negative */ if (((hssize_t)low_bounds[u] + space->select.offset[u]) < 0) @@ -4979,8 +4979,8 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset) FUNC_ENTER_PACKAGE - HDassert(space && space->extent.rank > 0); - HDassert(offset); + assert(space && space->extent.rank > 0); + assert(offset); /* Start at linear offset 0 */ *offset = 0; @@ -5045,7 +5045,7 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset) /* Advance to first span in "down" dimension */ if (span->down) { - HDassert(span->down->head); + assert(span->down->head); span = span->down->head; } /* end if */ else @@ -5112,8 +5112,8 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(space); - HDassert(num_elem_non_unlim); + assert(space); + assert(num_elem_non_unlim); /* Get number of elements in the non-unlimited dimensions */ if (space->select.sel_info.hslab->unlim_dim >= 0) @@ -5153,7 +5153,7 @@ H5S__hyper_is_contiguous(const H5S_t *space) FUNC_ENTER_PACKAGE_NOERR - HDassert(space); + assert(space); /* Check for a "regular" hyperslab selection */ /* (No need to rebuild the dimension info yet -QAK) */ @@ -5338,7 +5338,7 @@ H5S__hyper_is_single(const H5S_t *space) FUNC_ENTER_PACKAGE_NOERR - HDassert(space); + assert(space); /* Check for a "single" hyperslab selection */ /* (No need to rebuild the dimension info yet, since the span-tree @@ -5412,7 +5412,7 @@ H5S__hyper_is_regular(H5S_t *space) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(space); + assert(space); /* Attempt to rebuild diminfo if it is invalid and has not been confirmed * to be impossible. @@ -5464,10 +5464,10 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1, FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(span_info1); - HDassert(span_info2); - HDassert(offset); - HDassert(rest_zeros); + assert(span_info1); + assert(span_info2); + assert(offset); + assert(rest_zeros); /* Compare low & high bounds for this span list */ /* (Could compare lower dimensions also, but not certain if @@ -5486,8 +5486,8 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1, span2 = span_info2->head; /* Sanity checking */ - HDassert(span1); - HDassert(span2); + assert(span1); + assert(span2); /* infinite loop which must be broken out of */ while (1) { @@ -5574,9 +5574,9 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(span_info1); - HDassert(span_info2); - HDassert(ndims > 0); + assert(span_info1); + assert(span_info2); + assert(ndims > 0); /* Initialize arrays */ HDmemset(offset, 0, sizeof(offset)); @@ -5598,7 +5598,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h /* Sanity check */ /* (Both span trees must have the same depth) */ - HDassert((span1->down && span2->down) || (NULL == span1->down && NULL == span2->down)); + assert((span1->down && span2->down) || (NULL == span1->down && NULL == span2->down)); /* Advance to next dimension */ if (span1->down) { @@ -5620,7 +5620,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h /* Sanity check */ /* (Must eventually have found a non-zero offset) */ - HDassert(i >= 0); + assert(i >= 0); } /* end if */ /* If the offset vector is all zero, we can use the faster span tree @@ -5669,16 +5669,16 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space1); - HDassert(space2); + assert(space1); + assert(space2); /* Get dataspace ranks */ space1_rank = space1->extent.rank; space2_rank = space2->extent.rank; /* Sanity check */ - HDassert(space1_rank >= space2_rank); - HDassert(space2_rank > 0); + assert(space1_rank >= space2_rank); + assert(space2_rank > 0); /* Rebuild diminfo if it is invalid and has not been confirmed to be * impossible */ @@ -5767,7 +5767,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2) } /* end while */ /* Sanity check */ - HDassert(spans1); + assert(spans1); } /* end if */ else spans1 = space1->select.sel_info.hslab->span_lst; @@ -5807,7 +5807,7 @@ H5S__hyper_release(H5S_t *space) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); + assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); /* Reset the number of points selected */ space->select.num_elem = 0; @@ -5853,8 +5853,8 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords) FUNC_ENTER_PACKAGE - HDassert(rank > 0); - HDassert(coords); + assert(rank > 0); + assert(coords); /* Search for location to insert new element in tree */ if (rank > 1) { @@ -5920,10 +5920,10 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(span_tree); - HDassert(rank > 0); - HDassert(coords); - HDassert(first_dim_modified); + assert(span_tree); + assert(rank > 0); + assert(coords); + assert(first_dim_modified); /* Get pointer to last span in span tree */ tail_span = span_tree->tail; @@ -5939,7 +5939,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra prev_down_tail_span_high = tail_span->down->tail->high; /* Drop down a dimension */ - HDassert(rank > 1); + assert(rank > 1); if (H5S__hyper_add_span_element_helper(tail_span->down, rank - 1, &coords[1], first_dim_modified) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert coordinate into span tree") @@ -5984,14 +5984,14 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra /* Determine which span to stop at */ if (tail_span->down->tail != prev_down_tail_span) { /* Sanity check */ - HDassert(prev_down_tail_span->next == tail_span->down->tail); + assert(prev_down_tail_span->next == tail_span->down->tail); /* Set the span to stop at */ stop_span = prev_down_tail_span; } /* end if */ else { /* Sanity check */ - HDassert(prev_down_tail_span_high != tail_span->down->tail->high); + assert(prev_down_tail_span_high != tail_span->down->tail->high); /* Set the span to stop at */ stop_span = tail_span->down->tail; @@ -6044,13 +6044,13 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra /* Update pointers appropriately */ if (stop_span == prev_down_tail_span) { /* Sanity check */ - HDassert(stop_span->next == tail_span->down->tail); + assert(stop_span->next == tail_span->down->tail); tmp_span->next = stop_span->next; } /* end if */ else { /* Sanity check */ - HDassert(tmp_span->next == tail_span->down->tail); + assert(tmp_span->next == tail_span->down->tail); tmp_span->next = NULL; tail_span->down->tail = tmp_span; @@ -6106,7 +6106,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra } /* end else */ /* Update high bound for current span tree */ - HDassert(coords[0] > span_tree->high_bounds[0]); + assert(coords[0] > span_tree->high_bounds[0]); span_tree->high_bounds[0] = coords[0]; /* Update high bounds for dimensions below this one */ @@ -6168,10 +6168,10 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords) FUNC_ENTER_NOAPI(FAIL) - HDassert(space); - HDassert(rank > 0); - HDassert(coords); - HDassert(space->extent.rank == rank); + assert(space); + assert(rank > 0); + assert(coords); + assert(space->extent.rank == rank); /* Check if this is the first element in the selection */ if (NULL == space->select.sel_info.hslab) { @@ -6264,9 +6264,9 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(spans); - HDassert(start); - HDassert(end); + assert(spans); + assert(start); + assert(end); /* Check if we've already visited this span tree */ if (spans->op_info[op_info_i].op_gen != op_gen) { @@ -6351,10 +6351,10 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(space); - HDassert(H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); - HDassert(start); - HDassert(end); + assert(space); + assert(H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); + assert(start); + assert(end); /* Attempt to rebuild diminfo if it is invalid and has not been confirmed * to be impossible. @@ -6401,7 +6401,7 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en nstride = 0; /* Sanity check */ - HDassert(nstride <= space->select.sel_info.hslab->diminfo.opt[u].count); + assert(nstride <= space->select.sel_info.hslab->diminfo.opt[u].count); /* "Rebase" the adjusted start coord into the same range * range of values as the selections's first block. @@ -6482,8 +6482,8 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(spans); - HDassert(offset); + assert(spans); + assert(offset); /* Check if we've already set this span tree */ if (spans->op_info[op_info_i].op_gen != op_gen) { @@ -6492,7 +6492,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs /* Adjust the span tree's low & high bounds */ for (u = 0; u < rank; u++) { - HDassert(spans->low_bounds[u] >= offset[u]); + assert(spans->low_bounds[u] >= offset[u]); spans->low_bounds[u] -= offset[u]; spans->high_bounds[u] -= offset[u]; } /* end for */ @@ -6501,7 +6501,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs span = spans->head; while (span != NULL) { /* Adjust span offset */ - HDassert(span->low >= *offset); + assert(span->low >= *offset); span->low -= *offset; span->high -= *offset; @@ -6547,8 +6547,8 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset) FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(space); - HDassert(offset); + assert(space); + assert(offset); /* Check for an all-zero offset vector */ for (u = 0; u < space->extent.rank; u++) @@ -6563,11 +6563,11 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset) /* (No need to rebuild the dimension info yet -QAK) */ if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < space->extent.rank; u++) { - HDassert(space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]); + assert(space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]); space->select.sel_info.hslab->diminfo.opt[u].start -= offset[u]; /* Adjust the low & high bounds */ - HDassert(space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]); + assert(space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]); space->select.sel_info.hslab->diminfo.low_bounds[u] -= offset[u]; space->select.sel_info.hslab->diminfo.high_bounds[u] -= offset[u]; } /* end for */ @@ -6612,8 +6612,8 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); - HDassert(offset); + assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); + assert(offset); /* Check for a "regular" hyperslab selection */ /* (No need to rebuild the dimension info yet -QAK) */ @@ -6625,11 +6625,11 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset) /* Build the table of the initial offset */ for (u = 0; u < space->extent.rank; u++) { /* Sanity check diminfo */ - HDassert(1 == diminfo[u].count); - HDassert(1 == diminfo[u].block); + assert(1 == diminfo[u].count); + assert(1 == diminfo[u].block); /* Sanity check bounds, while we're here */ - HDassert(diminfo[u].start == space->select.sel_info.hslab->diminfo.low_bounds[u]); + assert(diminfo[u].start == space->select.sel_info.hslab->diminfo.low_bounds[u]); /* Keep the offset for later */ block[u] = diminfo[u].start; @@ -6644,9 +6644,9 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset) curr_dim = 0; while (1) { /* Sanity checks */ - HDassert(NULL == curr->next); - HDassert(curr->low == curr->high); - HDassert(curr_dim < space->extent.rank); + assert(NULL == curr->next); + assert(curr->low == curr->high); + assert(curr_dim < space->extent.rank); /* Save the location of the selection in current dimension */ block[curr_dim] = curr->low; @@ -6690,16 +6690,16 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space)); - HDassert(new_space); - HDassert(new_space->extent.rank < base_space->extent.rank); + assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space)); + assert(new_space); + assert(new_space->extent.rank < base_space->extent.rank); /* Walk down the span tree until we reach the selection to project */ down = base_space->select.sel_info.hslab->span_lst; curr_dim = 0; while (down && curr_dim < (base_space->extent.rank - new_space->extent.rank)) { /* Sanity check */ - HDassert(NULL == down->head->next); + assert(NULL == down->head->next); /* Advance down to next dimension */ down = down->head->down; @@ -6741,9 +6741,9 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space)); - HDassert(new_space); - HDassert(new_space->extent.rank > base_space->extent.rank); + assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space)); + assert(new_space); + assert(new_space->extent.rank > base_space->extent.rank); /* Create nodes until reaching the correct # of dimensions */ new_space->select.sel_info.hslab->span_lst = NULL; @@ -6766,7 +6766,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space) /* Allocate a new node */ if (NULL == (new_span = H5S__hyper_new_span((hsize_t)0, (hsize_t)0, NULL, NULL))) { - HDassert(new_span_info); + assert(new_span_info); if (!prev_span) (void)H5FL_ARR_FREE(hbounds_t, new_span_info); HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") @@ -6801,7 +6801,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space) } /* end while */ if (NULL == new_space->select.sel_info.hslab->span_lst) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer") - HDassert(prev_span); + assert(prev_span); /* Share the underlying hyperslab span information */ prev_span->down = base_space->select.sel_info.hslab->span_lst; @@ -6841,9 +6841,9 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of FUNC_ENTER_PACKAGE /* Check args */ - HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space)); - HDassert(new_space); - HDassert(offset); + assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space)); + assert(new_space); + assert(offset); /* We are setting a new selection, remove any current selection in new dataspace */ if (H5S_SELECT_RELEASE(new_space) < 0) @@ -6880,7 +6880,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of new_space_dim = 0; } /* end if */ else { - HDassert(new_space->extent.rank > base_space->extent.rank); + assert(new_space->extent.rank > base_space->extent.rank); /* The offset is zero when projected into higher dimensions */ *offset = 0; @@ -6976,7 +6976,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of "can't project hyperslab selection into less dimensions") } /* end if */ else { - HDassert(new_space->extent.rank > base_space->extent.rank); + assert(new_space->extent.rank > base_space->extent.rank); /* The offset is zero when projected into higher dimensions */ *offset = 0; @@ -7029,8 +7029,8 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(spans); - HDassert(offset); + assert(spans); + assert(offset); /* Check if we've already set this span tree */ if (spans->op_info[op_info_i].op_gen != op_gen) { @@ -7039,7 +7039,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs /* Adjust the span tree's low & high bounds */ for (u = 0; u < rank; u++) { - HDassert((hssize_t)spans->low_bounds[u] >= offset[u]); + assert((hssize_t)spans->low_bounds[u] >= offset[u]); spans->low_bounds[u] = (hsize_t)((hssize_t)spans->low_bounds[u] - offset[u]); spans->high_bounds[u] = (hsize_t)((hssize_t)spans->high_bounds[u] - offset[u]); } /* end for */ @@ -7048,7 +7048,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs span = spans->head; while (span != NULL) { /* Adjust span offset */ - HDassert((hssize_t)span->low >= *offset); + assert((hssize_t)span->low >= *offset); span->low = (hsize_t)((hssize_t)span->low - *offset); span->high = (hsize_t)((hssize_t)span->high - *offset); @@ -7094,8 +7094,8 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset) FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(space); - HDassert(offset); + assert(space); + assert(offset); /* Check for an all-zero offset vector */ for (u = 0; u < space->extent.rank; u++) @@ -7110,12 +7110,12 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset) /* (No need to rebuild the dimension info yet -QAK) */ if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < space->extent.rank; u++) { - HDassert((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]); + assert((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]); space->select.sel_info.hslab->diminfo.opt[u].start = (hsize_t)((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start - offset[u]); /* Adjust the low & high bounds */ - HDassert((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]); + assert((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]); space->select.sel_info.hslab->diminfo.low_bounds[u] = (hsize_t)((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] - offset[u]); space->select.sel_info.hslab->diminfo.high_bounds[u] = @@ -7170,8 +7170,8 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset) FUNC_ENTER_NOAPI(FAIL) /* Sanity checks */ - HDassert(space); - HDassert(old_offset); + assert(space); + assert(old_offset); /* Check for hyperslab selection & offset changed */ if (H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS && space->select.offset_changed) { @@ -7227,8 +7227,8 @@ H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset) FUNC_ENTER_NOAPI(FAIL) /* Sanity checks */ - HDassert(space); - HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); + assert(space); + assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); /* Call the 'adjust' routine */ if (H5S__hyper_adjust_s(space, old_offset) < 0) @@ -7272,7 +7272,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_ FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(span_tree); + assert(span_tree); /* Check for adding first node to merged spans */ if (*span_tree == NULL) { @@ -7296,7 +7296,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_ (*span_tree)->high_bounds[0] = high; if (down) { /* Sanity check */ - HDassert(ndims > 1); + assert(ndims > 1); H5MM_memcpy(&((*span_tree)->low_bounds[1]), down->low_bounds, sizeof(hsize_t) * (ndims - 1)); H5MM_memcpy(&((*span_tree)->high_bounds[1]), down->high_bounds, sizeof(hsize_t) * (ndims - 1)); @@ -7321,7 +7321,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_ /* Sanity check */ /* (If down_cmp was set to TRUE above, we won't be in this branch) */ - HDassert(down_cmp != TRUE); + assert(down_cmp != TRUE); /* Check if there is actually a down span */ if (down) { @@ -7346,8 +7346,8 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_ /* Update low & high bounds in lower dimensions, if there are any */ if (down) { /* Sanity checks */ - HDassert(ndims > 1); - HDassert(down_cmp >= 0); + assert(ndims > 1); + assert(down_cmp >= 0); /* Check if we are sharing down spans with a previous node */ /* (Only need to check for bounds changing if down spans aren't shared) */ @@ -7432,11 +7432,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s FUNC_ENTER_PACKAGE /* Check args */ - HDassert(a_spans); - HDassert(b_spans); - HDassert(a_not_b); - HDassert(a_and_b); - HDassert(b_not_a); + assert(a_spans); + assert(b_spans); + assert(a_not_b); + assert(a_and_b); + assert(b_not_a); /* Set which list(s) to be generated, based on selector */ need_a_not_b = ((selector & H5S_HYPER_COMPUTE_A_NOT_B) != 0); @@ -7540,8 +7540,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps between upper part of span 'a' and lower part of span 'b' */ /* Make certain both spans either have a down span or both don't have one */ - HDassert((span_a->down != NULL && span_b->down != NULL) || - (span_a->down == NULL && span_b->down == NULL)); + assert((span_a->down != NULL && span_b->down != NULL) || + (span_a->down == NULL && span_b->down == NULL)); /* If there are no down spans, just add the overlapping area to the a_and_b list */ if (span_a->down == NULL) { @@ -7570,7 +7570,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_not_b list */ if (down_a_not_b) { - HDassert(need_a_not_b == TRUE); + assert(need_a_not_b == TRUE); /* Merge/add overlapped part with/to a_not_b list */ if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_a->high, @@ -7585,7 +7585,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_and_b list */ if (down_a_and_b) { - HDassert(need_a_and_b == TRUE); + assert(need_a_and_b == TRUE); /* Merge/add overlapped part with/to a_and_b list */ if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high, @@ -7600,7 +7600,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the b_not_a list */ if (down_b_not_a) { - HDassert(need_b_not_a == TRUE); + assert(need_b_not_a == TRUE); /* Merge/add overlapped part with/to b_not_a list */ if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->high, @@ -7654,8 +7654,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps between middle part of span 'a' and span 'b' */ /* Make certain both spans either have a down span or both don't have one */ - HDassert((span_a->down != NULL && span_b->down != NULL) || - (span_a->down == NULL && span_b->down == NULL)); + assert((span_a->down != NULL && span_b->down != NULL) || + (span_a->down == NULL && span_b->down == NULL)); /* If there are no down spans, just add the overlapping area to the a_and_b list */ if (span_a->down == NULL) { @@ -7680,7 +7680,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_not_b list */ if (down_a_not_b) { - HDassert(need_a_not_b == TRUE); + assert(need_a_not_b == TRUE); /* Merge/add overlapped part with/to a_not_b list */ if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_b->high, @@ -7695,7 +7695,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_and_b list */ if (down_a_and_b) { - HDassert(need_a_and_b == TRUE); + assert(need_a_and_b == TRUE); /* Merge/add overlapped part with/to a_and_b list */ if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high, @@ -7710,7 +7710,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the b_not_a list */ if (down_b_not_a) { - HDassert(need_b_not_a == TRUE); + assert(need_b_not_a == TRUE); /* Merge/add overlapped part with/to b_not_a list */ if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high, @@ -7761,8 +7761,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps between span 'a' and midle of span 'b' */ /* Make certain both spans either have a down span or both don't have one */ - HDassert((span_a->down != NULL && span_b->down != NULL) || - (span_a->down == NULL && span_b->down == NULL)); + assert((span_a->down != NULL && span_b->down != NULL) || + (span_a->down == NULL && span_b->down == NULL)); /* If there are no down spans, just add the overlapping area to the a_and_b list */ if (span_a->down == NULL) { @@ -7787,7 +7787,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_not_b list */ if (down_a_not_b) { - HDassert(need_a_not_b == TRUE); + assert(need_a_not_b == TRUE); /* Merge/add overlapped part with/to a_not_b list */ if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high, @@ -7802,7 +7802,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_and_b list */ if (down_a_and_b) { - HDassert(need_a_and_b == TRUE); + assert(need_a_and_b == TRUE); /* Merge/add overlapped part with/to a_and_b list */ if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high, @@ -7817,7 +7817,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the b_not_a list */ if (down_b_not_a) { - HDassert(need_b_not_a == TRUE); + assert(need_b_not_a == TRUE); /* Merge/add overlapped part with/to b_not_a list */ if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_a->high, @@ -7878,8 +7878,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps between lower part of span 'a' and upper part of span 'b' */ /* Make certain both spans either have a down span or both don't have one */ - HDassert((span_a->down != NULL && span_b->down != NULL) || - (span_a->down == NULL && span_b->down == NULL)); + assert((span_a->down != NULL && span_b->down != NULL) || + (span_a->down == NULL && span_b->down == NULL)); /* If there are no down spans, just add the overlapping area to the a_and_b list */ if (span_a->down == NULL) { @@ -7904,7 +7904,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_not_b list */ if (down_a_not_b) { - HDassert(need_a_not_b == TRUE); + assert(need_a_not_b == TRUE); /* Merge/add overlapped part with/to a_not_b list */ if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->high, @@ -7919,7 +7919,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the a_and_b list */ if (down_a_and_b) { - HDassert(need_a_and_b == TRUE); + assert(need_a_and_b == TRUE); /* Merge/add overlapped part with/to a_and_b list */ if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high, @@ -7934,7 +7934,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for additions to the b_not_a list */ if (down_b_not_a) { - HDassert(need_b_not_a == TRUE); + assert(need_b_not_a == TRUE); /* Merge/add overlapped part with/to b_not_a list */ if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_b->high, @@ -8038,7 +8038,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s } /* end if */ else /* Sanity check */ - HDassert(span_a == NULL && span_b == NULL); + assert(span_a == NULL && span_b == NULL); } /* end else */ } /* end else */ @@ -8078,7 +8078,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf FUNC_ENTER_PACKAGE /* Make certain both 'a' & 'b' spans have down span trees or neither does */ - HDassert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL)); + assert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL)); /* Check if the span trees for the 'a' span and the 'b' span are the same */ if (H5S__hyper_cmp_spans(a_spans, b_spans)) { @@ -8411,8 +8411,8 @@ H5S__hyper_merge_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(space); - HDassert(new_spans); + assert(space); + assert(new_spans); /* If this is the first span tree in the hyperslab selection, just use it */ if (space->select.sel_info.hslab->span_lst == NULL) { @@ -8466,7 +8466,7 @@ H5S__hyper_spans_nelem_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i, FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(spans); + assert(spans); /* Check if the span tree was already counted */ if (spans->op_info[op_info_i].op_gen == op_gen) @@ -8536,7 +8536,7 @@ H5S__hyper_spans_nelem(H5S_hyper_span_info_t *spans) FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(spans); + assert(spans); /* Acquire an operation generation value for this operation */ op_gen = H5S__hyper_get_op_gen(); @@ -8580,8 +8580,8 @@ H5S__hyper_add_disjoint_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space); - HDassert(new_spans); + assert(space); + assert(new_spans); /* Update the number of elements in the selection */ space->select.num_elem += H5S__hyper_spans_nelem(new_spans); @@ -8636,11 +8636,11 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride FUNC_ENTER_PACKAGE /* Check args */ - HDassert(rank > 0); - HDassert(start); - HDassert(stride); - HDassert(count); - HDassert(block); + assert(rank > 0); + assert(start); + assert(stride); + assert(count); + assert(block); /* Start creating spans in fastest changing dimension */ for (i = (int)(rank - 1); i >= 0; i--) { @@ -8784,8 +8784,8 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(space); - HDassert(new_hyper_diminfo); + assert(space); + assert(new_hyper_diminfo); /* Check for conditions that prevent us from using the fast algorithm here */ /* (and instead require H5S__hyper_rebuild) */ @@ -8940,13 +8940,13 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t /* Set the new diminfo values */ space->select.sel_info.hslab->diminfo.app[curr_dim].start = space->select.sel_info.hslab->diminfo.opt[curr_dim].start = tmp_diminfo[curr_dim].start; - HDassert(tmp_diminfo[curr_dim].stride > 0); + assert(tmp_diminfo[curr_dim].stride > 0); space->select.sel_info.hslab->diminfo.app[curr_dim].stride = space->select.sel_info.hslab->diminfo.opt[curr_dim].stride = tmp_diminfo[curr_dim].stride; - HDassert(tmp_diminfo[curr_dim].count > 0); + assert(tmp_diminfo[curr_dim].count > 0); space->select.sel_info.hslab->diminfo.app[curr_dim].count = space->select.sel_info.hslab->diminfo.opt[curr_dim].count = tmp_diminfo[curr_dim].count; - HDassert(tmp_diminfo[curr_dim].block > 0); + assert(tmp_diminfo[curr_dim].block > 0); space->select.sel_info.hslab->diminfo.app[curr_dim].block = space->select.sel_info.hslab->diminfo.opt[curr_dim].block = tmp_diminfo[curr_dim].block; @@ -9001,7 +9001,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(spans); + assert(spans); /* Initialization */ span = spans->head; @@ -9027,7 +9027,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp hsize_t curr_block; /* Block size of current span */ /* Sanity check */ - HDassert(prev_span); + assert(prev_span); /* Check that down spans match current slab info */ /* (Can skip check if previous span's down pointer is same as current one) */ @@ -9100,8 +9100,8 @@ H5S__hyper_rebuild(H5S_t *space) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(space); - HDassert(space->select.sel_info.hslab->span_lst); + assert(space); + assert(space->select.sel_info.hslab->span_lst); /* Check whether the slab can be rebuilt */ /* (Only regular selection can be rebuilt. If yes, fill in correct values) */ @@ -9153,8 +9153,8 @@ H5S__hyper_generate_spans(H5S_t *space) FUNC_ENTER_PACKAGE - HDassert(space); - HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); + assert(space); + assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); /* Get the diminfo */ for (u = 0; u < space->extent.rank; u++) { @@ -9207,8 +9207,8 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(spans1); - HDassert(spans2); + assert(spans1); + assert(spans2); /* Use low & high bounds to try to avoid spinning through the span lists */ if (H5S_RANGE_OVERLAP(spans1->low_bounds[0], spans1->high_bounds[0], spans2->low_bounds[0], @@ -9224,7 +9224,7 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp /* Check for spans in lowest dimension already */ if (span1->down) { /* Sanity check */ - HDassert(span2->down); + assert(span2->down); /* Check lower dimensions for overlap */ if (H5S__check_spans_overlap(span1->down, span2->down)) @@ -9252,8 +9252,8 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp } /* end while */ /* Make certain we've exhausted our comparisons */ - HDassert((NULL == span1 && (NULL != span2 && NULL == span2->next)) || - ((NULL != span1 && NULL == span1->next) && NULL == span2)); + assert((NULL == span1 && (NULL != span2 && NULL == span2->next)) || + ((NULL != span1 && NULL == span1->next) && NULL == span2)); } /* end of */ done: @@ -9304,13 +9304,13 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s FUNC_ENTER_PACKAGE - HDassert(space1); - HDassert(space2_span_lst); - HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); + assert(space1); + assert(space2_span_lst); + assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); /* The result is either a to-be-created space or an empty one */ - HDassert(*result == NULL || *result == space1); - HDassert(space1->select.sel_info.hslab->span_lst); - HDassert(span2_owned); + assert(*result == NULL || *result == space1); + assert(space1->select.sel_info.hslab->span_lst); + assert(span2_owned); /* Reset flags to return */ *span2_owned = FALSE; @@ -9373,7 +9373,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s case H5S_SELECT_NOTA: if (!is_result_new) { - HDassert(space1 == *result); + assert(space1 == *result); /* Free the current selection */ if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0) @@ -9456,7 +9456,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s case H5S_SELECT_NOTB: case H5S_SELECT_NOTA: if (!is_result_new) { - HDassert(space1 == *result); + assert(space1 == *result); /* Free the current selection */ if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0) @@ -9483,7 +9483,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s /* Other than OR, the span_lst is set to NULL. And in OR, * a_not_b is not needed */ - HDassert(NULL == (*result)->select.sel_info.hslab->span_lst); + assert(NULL == (*result)->select.sel_info.hslab->span_lst); /* The results dataspace takes ownership of the spans */ /* (Since it must be NULL) */ @@ -9506,7 +9506,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s * 2. a_not_b will never be computed together with a_and_b * because merging these two equals to a. */ - HDassert(NULL == (*result)->select.sel_info.hslab->span_lst); + assert(NULL == (*result)->select.sel_info.hslab->span_lst); /* The results dataspace takes ownership of the spans */ /* (Since it must be NULL) */ @@ -9589,12 +9589,12 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space); - HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID); - HDassert(start); - HDassert(stride); - HDassert(count); - HDassert(block); + assert(space); + assert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID); + assert(start); + assert(stride); + assert(count); + assert(block); /* Generate span tree for new hyperslab information */ if (NULL == (new_spans = H5S__hyper_make_spans(space->extent.rank, start, stride, count, block))) @@ -9630,7 +9630,7 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c unsigned u; /* Local index variable */ /* Sanity check */ - HDassert(space->select.sel_info.hslab->span_lst->head); + assert(space->select.sel_info.hslab->span_lst->head); /* Build diminfo struct */ for (u = 0; u < space->extent.rank; u++) { @@ -9681,14 +9681,14 @@ H5S__set_regular_hyperslab(H5S_t *space, const hsize_t start[], const hsize_t *a FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space); - HDassert(start); - HDassert(app_stride); - HDassert(app_count); - HDassert(app_block); - HDassert(opt_stride); - HDassert(opt_count); - HDassert(opt_block); + assert(space); + assert(start); + assert(app_stride); + assert(app_count); + assert(app_block); + assert(opt_stride); + assert(opt_count); + assert(opt_block); /* If we are setting a new selection, remove current selection first */ if (H5S_SELECT_RELEASE(space) < 0) @@ -9782,9 +9782,9 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space); - HDassert(start); - HDassert(block); + assert(space); + assert(start); + assert(block); /* Check for single block selection in dataspace */ single_block = TRUE; @@ -9940,7 +9940,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h } /* end if */ /* Sanity check */ - HDassert(first_span_start <= last_span_start); + assert(first_span_start <= last_span_start); /* Compute new start / count / block values */ new_start[u] = first_span_start; @@ -10015,10 +10015,10 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons FUNC_ENTER_NOAPI(FAIL) /* Check args */ - HDassert(space); - HDassert(start); - HDassert(count); - HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID); + assert(space); + assert(start); + assert(count); + assert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID); /* Point to the correct stride values */ if (stride == NULL) @@ -10099,8 +10099,8 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons if (count[u] == 1) int_stride[u] = 1; else { - HDassert((stride[u] > block[u]) || - ((stride[u] == block[u]) && (count[u] == H5S_UNLIMITED))); + assert((stride[u] > block[u]) || + ((stride[u] == block[u]) && (count[u] == H5S_UNLIMITED))); int_stride[u] = stride[u]; } /* end else */ int_count[u] = count[u]; @@ -10118,7 +10118,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons "cannot modify unlimited selection with another unlimited selection") if (!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") - HDassert(space->select.sel_info.hslab->diminfo_valid); + assert(space->select.sel_info.hslab->diminfo_valid); /* Clip unlimited selection to include new selection */ if (H5S_hyper_clip_unlim(space, @@ -10129,7 +10129,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") /* If an empty space was returned it must be "none" */ - HDassert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE)); + assert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE)); } /* end if */ /* Fixup operation for non-hyperslab selections */ @@ -10235,7 +10235,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons hbool_t single_block; /* Whether the selection is a single block */ /* Sanity check */ - HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); + assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); /* Handle unlimited selections */ if (unlim_dim >= 0) { @@ -10261,14 +10261,14 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons */ H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, bounds_end[unlim_dim] + (hsize_t)1); - HDassert((tmp_count == 1) || (opt_count != H5S_hyper_ones_g)); - HDassert((tmp_block == 1) || (opt_block != H5S_hyper_ones_g)); + assert((tmp_count == 1) || (opt_count != H5S_hyper_ones_g)); + assert((tmp_block == 1) || (opt_block != H5S_hyper_ones_g)); if (opt_count != H5S_hyper_ones_g) { - HDassert(opt_count == int_count); + assert(opt_count == int_count); int_count[unlim_dim] = tmp_count; } /* end if */ if (opt_block != H5S_hyper_ones_g) { - HDassert(opt_block == int_block); + assert(opt_block == int_block); int_block[unlim_dim] = tmp_block; } /* end if */ } /* end if */ @@ -10414,12 +10414,12 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st FUNC_ENTER_NOAPI(FAIL) /* Check args */ - HDassert(old_space); - HDassert(start); - HDassert(count); - HDassert(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA); - HDassert(new_space); - HDassert(*new_space == NULL); + assert(old_space); + assert(start); + assert(count); + assert(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA); + assert(new_space); + assert(*new_space == NULL); /* Point to the correct stride values */ if (stride == NULL) @@ -10604,14 +10604,14 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(space1); - HDassert(space2); - HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); - HDassert(space1->extent.rank == space2->extent.rank); + assert(space1); + assert(space2); + assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); + assert(space1->extent.rank == space2->extent.rank); /* The result is either a to-be-created space or an empty one */ - HDassert(NULL == *result || *result == space1); - HDassert(space1->select.sel_info.hslab->span_lst); - HDassert(space2->select.sel_info.hslab->span_lst); + assert(NULL == *result || *result == space1); + assert(space1->select.sel_info.hslab->span_lst); + assert(space2->select.sel_info.hslab->span_lst); /* Note: the offset of space2 is not considered here for bounding box */ if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, FALSE, &span2_owned, @@ -10620,7 +10620,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu /* Update diminfo if space2's diminfo was valid, otherwise just mark it as * invalid if the spans were updated */ - HDassert(result); + assert(result); if (updated_spans) { if (space2->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { if (H5S__hyper_update_diminfo(*result, op, space2->select.sel_info.hslab->diminfo.opt) < 0) @@ -10718,9 +10718,9 @@ H5S__combine_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space1); - HDassert(space2); - HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); + assert(space1); + assert(space2); + assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); /* Check if space1 selections has span trees */ if (NULL == space1->select.sel_info.hslab->span_lst) @@ -10859,9 +10859,9 @@ H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(space1); - HDassert(space2); - HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); + assert(space1); + assert(space2); + assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA); /* Check that the space selections both have span trees */ if (NULL == space1->select.sel_info.hslab->span_lst) @@ -11009,14 +11009,14 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) FUNC_ENTER_PACKAGE - HDassert(udata->nelem > 0); + assert(udata->nelem > 0); /* * Skip over skipped elements */ if (udata->skip > 0) { /* Work upwards, finishing each span tree before moving up */ - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); do { /* Check for lowest dimension */ if (udata->ds_span[udata->depth]->down) { @@ -11039,11 +11039,11 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) } /* end if */ } /* end if */ else { - HDassert(udata->ds_rank - udata->depth == 1); + assert(udata->ds_rank - udata->depth == 1); /* If we will run out of elements to skip in this span, * skip the remainder of the skipped elements and break out */ - HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); + assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); if (udata->skip < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) { udata->ds_low[udata->depth] += udata->skip; udata->skip = 0; @@ -11074,7 +11074,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Ran out of spans, move up one dimension */ udata->depth--; - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); udata->ds_low[udata->depth]++; } else @@ -11083,9 +11083,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) } while ((udata->skip > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high)); /* Work downwards until skip is 0 */ - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); while (udata->skip > 0) { - HDassert(udata->ds_span[udata->depth]->down); + assert(udata->ds_span[udata->depth]->down); udata->depth++; udata->ds_span[udata->depth] = udata->ds_span[udata->depth - 1]->down->head; udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low; @@ -11109,7 +11109,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Advance to next span */ udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next; - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low; } while (udata->skip > 0); } /* end if */ @@ -11129,7 +11129,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Advance to next span */ udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next; - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low; } while (udata->skip > 0); } /* end else */ @@ -11141,7 +11141,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) */ /* Work upwards, adding all elements of each span tree until it can't fit * all elements */ - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); do { /* Check for lowest dimension */ if (udata->ds_span[udata->depth]->down) { @@ -11224,11 +11224,11 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) } /* end if */ } /* end if */ else { - HDassert(udata->ds_rank - udata->depth == 1); + assert(udata->ds_rank - udata->depth == 1); /* If we will run out of elements to add in this span, add the * remainder of the elements and break out */ - HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); + assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); if (udata->nelem < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) { if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1, udata->ds_low[udata->depth], udata->ds_low[udata->depth] + udata->nelem - 1, NULL) < 0) @@ -11252,7 +11252,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) else if (udata->depth > 0) { /* Append this span tree to the higher dimension's, and release * ownership of it */ - HDassert(udata->ps_span_info[udata->depth]); + assert(udata->ps_span_info[udata->depth]); if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth - 1], udata->ds_rank - udata->depth + 1, udata->ds_low[udata->depth - 1], udata->ds_low[udata->depth - 1], @@ -11264,7 +11264,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Ran out of spans, move up one dimension */ udata->depth--; - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); udata->ds_low[udata->depth]++; } /* end if */ else { @@ -11278,9 +11278,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) } while ((udata->nelem > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high)); /* Work downwards until nelem is 0 */ - HDassert(udata->ds_span[udata->depth] || (udata->nelem == 0)); + assert(udata->ds_span[udata->depth] || (udata->nelem == 0)); while (udata->nelem > 0) { - HDassert(udata->ds_span[udata->depth]->down); + assert(udata->ds_span[udata->depth]->down); udata->depth++; udata->ds_span[udata->depth] = udata->ds_span[udata->depth - 1]->down->head; udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low; @@ -11290,7 +11290,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) * any complete spans, advance to the first not fully added * span and continue down */ - HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); + assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); if (udata->nelem < H5S__hyper_spans_nelem_helper(udata->ds_span[udata->depth]->down, 0, udata->op_gen) * (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) { @@ -11365,16 +11365,16 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Advance to next span */ udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next; - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low; } while (udata->nelem > 0); } /* end if */ else { - HDassert(udata->ds_rank - udata->depth == 1); + assert(udata->ds_rank - udata->depth == 1); do { /* If we will run out of elements to add in this span, add * the remainder of the elements and break out */ - HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); + assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high); if (udata->nelem < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) { if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1, udata->ds_low[udata->depth], @@ -11393,14 +11393,14 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Advance to next span */ udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next; - HDassert(udata->ds_span[udata->depth]); + assert(udata->ds_span[udata->depth]); udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low; } while (udata->nelem > 0); } /* end else */ } /* end while */ - HDassert(udata->skip == 0); - HDassert(udata->nelem == 0); + assert(udata->skip == 0); + assert(udata->nelem == 0); /* Mark projected space as changed (for all ranks) */ udata->ps_clean_bitmap = 0; @@ -11408,7 +11408,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) done: /* Cleanup on failure */ if (copied_span_info) { - HDassert(ret_value < 0); + assert(ret_value < 0); if (H5S__hyper_free_span_info(copied_span_info) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") copied_span_info = NULL; @@ -11485,7 +11485,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper for (u = 0; u < count; u++) { ss_span = ss_span_info->head; sis_span = sis_span_info->head; - HDassert(ss_span && sis_span); + assert(ss_span && sis_span); ss_low = ss_span->low; sis_low = sis_span->low; @@ -11514,7 +11514,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper "can't iterate over source selections") } /* end if */ else { - HDassert(depth == udata->ss_rank - 1); + assert(depth == udata->ss_rank - 1); /* Add skipped elements if there's a pre-gap */ if (ss_low < sis_low) { @@ -11540,7 +11540,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper } /* end if */ else if (ss_span->high == high) { /* Advance source span */ - HDassert(ss_span->high < sis_span->high); + assert(ss_span->high < sis_span->high); sis_low = high + 1; ss_span = ss_span->next; if (ss_span) @@ -11548,7 +11548,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper } /* end if */ else { /* Advance source intersect span */ - HDassert(ss_span->high > sis_span->high); + assert(ss_span->high > sis_span->high); ss_low = high + 1; sis_span = sis_span->next; if (sis_span) @@ -11575,7 +11575,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper } /* end if */ else { /* Advance source intersect span */ - HDassert(ss_low > sis_span->high); + assert(ss_low > sis_span->high); sis_span = sis_span->next; if (sis_span) sis_low = sis_span->low; @@ -11615,18 +11615,18 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper * first iteration of the loop, if so we do not need to continue * looping and can just copy the result */ if (udata->ps_clean_bitmap & (((uint32_t)1) << depth)) { - HDassert(u == 0); + assert(u == 0); if (udata->skip == old_skip) { /* First case: algorithm added only elements */ - HDassert(udata->nelem >= old_nelem); + assert(udata->nelem >= old_nelem); udata->nelem += (count - 1) * (udata->nelem - old_nelem); } /* end if */ else if (udata->nelem == 0) { /* Second case: algorithm added only skip. In this case, * nelem must be 0 since otherwise adding skip would have * triggered a change in the projected space */ - HDassert(old_nelem == 0); - HDassert(udata->skip > old_skip); + assert(old_nelem == 0); + assert(udata->skip > old_skip); udata->skip += (count - 1) * (udata->skip - old_skip); } /* end if */ else { @@ -11636,9 +11636,9 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper hsize_t skip_add; hsize_t nelem_add; - HDassert(udata->nelem > 0); - HDassert(udata->skip > old_skip); - HDassert(old_nelem == 0); + assert(udata->nelem > 0); + assert(udata->skip > old_skip); + assert(old_nelem == 0); skip_add = udata->skip - old_skip; nelem_add = udata->nelem - old_nelem; @@ -11720,18 +11720,18 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i FUNC_ENTER_PACKAGE /* Check parameters */ - HDassert(src_space); - HDassert(dst_space); - HDassert(src_intersect_space); - HDassert(proj_space); + assert(src_space); + assert(dst_space); + assert(src_intersect_space); + assert(proj_space); /* Assert that src_space and src_intersect_space have same rank and there * are no point selections */ - HDassert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space)); - HDassert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space)); - HDassert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS); - HDassert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS); - HDassert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS); + assert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space)); + assert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space)); + assert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS); + assert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS); + assert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS); /* Set up ss_span_info */ if (H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_HYPERSLABS) { @@ -11746,7 +11746,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i } /* end if */ else { /* Create temporary span tree from all selection */ - HDassert(H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_ALL); + assert(H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_ALL); if (NULL == (ss_span_info_buf = H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(src_space), H5S_hyper_zeros_g, @@ -11768,7 +11768,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i } /* end if */ else { /* Create temporary span tree from all selection */ - HDassert(H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_ALL); + assert(H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_ALL); if (NULL == (ds_span_info_buf = H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(dst_space), H5S_hyper_zeros_g, @@ -11866,7 +11866,7 @@ done: unsigned u; for (u = 0; u < H5S_MAX_RANK; u++) - HDassert(!udata.ps_span_info[u]); + assert(!udata.ps_span_info[u]); } #endif /* NDEBUG */ @@ -11916,11 +11916,11 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize *count = (hsize_t)1; } /* end if */ else { - HDassert(*count == H5S_UNLIMITED); + assert(*count == H5S_UNLIMITED); /* Calculate initial count (last block may be partial) */ *count = (clip_size - start + stride - (hsize_t)1) / stride; - HDassert(*count > (hsize_t)0); + assert(*count > (hsize_t)0); } /* end else */ FUNC_LEAVE_NOAPI_VOID @@ -11959,11 +11959,11 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) FUNC_ENTER_NOAPI(FAIL) /* Check parameters */ - HDassert(space); + assert(space); hslab = space->select.sel_info.hslab; - HDassert(hslab); - HDassert(hslab->unlim_dim >= 0); - HDassert(!hslab->span_lst); + assert(hslab); + assert(hslab->unlim_dim >= 0); + assert(!hslab->span_lst); /* Save original unlimited dimension */ orig_unlim_dim = hslab->unlim_dim; @@ -12004,7 +12004,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Check if last block is partial. If superset is set, just keep the * last block complete to speed computation. */ - HDassert(clip_size > diminfo->start); + assert(clip_size > diminfo->start); if (((diminfo->stride * (diminfo->count - (hsize_t)1)) + diminfo->block) > (clip_size - diminfo->start)) { hsize_t start[H5S_MAX_RANK]; @@ -12090,9 +12090,9 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo FUNC_ENTER_PACKAGE_NOERR /* Check parameters */ - HDassert(clip_space); - HDassert(clip_space->select.sel_info.hslab); - HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); + assert(clip_space); + assert(clip_space->select.sel_info.hslab); + assert(clip_space->select.sel_info.hslab->unlim_dim >= 0); diminfo = &clip_space->select.sel_info.hslab->diminfo.opt[clip_space->select.sel_info.hslab->unlim_dim]; @@ -12105,7 +12105,7 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo else { /* Unlimited count, need to match extent so a block (possibly) gets cut * off so the number of slices matches num_slices */ - HDassert(diminfo->count == H5S_UNLIMITED); + assert(diminfo->count == H5S_UNLIMITED); /* Calculate number of complete blocks in clip_space */ count = num_slices / diminfo->block; @@ -12157,20 +12157,20 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbo FUNC_ENTER_NOAPI_NOERR /* Check parameters */ - HDassert(clip_space); - HDassert(match_space); - HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); + assert(clip_space); + assert(match_space); + assert(clip_space->select.sel_info.hslab->unlim_dim >= 0); /* Check for "none" match space */ if (match_space->select.type->type == H5S_SEL_NONE) num_slices = (hsize_t)0; else { - HDassert(match_space->select.type->type == H5S_SEL_HYPERSLABS); - HDassert(match_space->select.sel_info.hslab); + assert(match_space->select.type->type == H5S_SEL_HYPERSLABS); + assert(match_space->select.sel_info.hslab); /* Calculate number of slices */ num_slices = match_space->select.num_elem / clip_space->select.sel_info.hslab->num_elem_non_unlim; - HDassert((match_space->select.num_elem % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0); + assert((match_space->select.num_elem % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0); } /* end else */ /* Call "real" get_clip_extent function */ @@ -12214,14 +12214,14 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac FUNC_ENTER_NOAPI_NOERR /* Check parameters */ - HDassert(clip_space); - HDassert(match_space); - HDassert(clip_space->select.sel_info.hslab); - HDassert(match_space->select.sel_info.hslab); - HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); - HDassert(match_space->select.sel_info.hslab->unlim_dim >= 0); - HDassert(clip_space->select.sel_info.hslab->num_elem_non_unlim == - match_space->select.sel_info.hslab->num_elem_non_unlim); + assert(clip_space); + assert(match_space); + assert(clip_space->select.sel_info.hslab); + assert(match_space->select.sel_info.hslab); + assert(clip_space->select.sel_info.hslab->unlim_dim >= 0); + assert(match_space->select.sel_info.hslab->unlim_dim >= 0); + assert(clip_space->select.sel_info.hslab->num_elem_non_unlim == + match_space->select.sel_info.hslab->num_elem_non_unlim); match_diminfo = &match_space->select.sel_info.hslab->diminfo.opt[match_space->select.sel_info.hslab->unlim_dim]; @@ -12243,12 +12243,12 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac num_slices = block * count; /* Check for partial last block */ - HDassert(match_clip_size >= match_diminfo->start); + assert(match_clip_size >= match_diminfo->start); if (((match_diminfo->stride * (count - (hsize_t)1)) + block) > (match_clip_size - match_diminfo->start)) { /* Subtract slices missing from last block */ - HDassert((((match_diminfo->stride * (count - (hsize_t)1)) + block) - - (match_clip_size - match_diminfo->start)) < num_slices); + assert((((match_diminfo->stride * (count - (hsize_t)1)) + block) - + (match_clip_size - match_diminfo->start)) < num_slices); num_slices -= ((match_diminfo->stride * (count - (hsize_t)1)) + block) - (match_clip_size - match_diminfo->start); } /* end if */ @@ -12297,11 +12297,11 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) FUNC_ENTER_NOAPI(NULL) /* Check parameters */ - HDassert(space); + assert(space); hslab = space->select.sel_info.hslab; - HDassert(hslab); - HDassert(hslab->unlim_dim >= 0); - HDassert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED); + assert(hslab); + assert(hslab->unlim_dim >= 0); + assert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED); /* Set start to select block_indexth block in unlimited dimension and set * count to 1 in that dimension to only select that block. Copy all other @@ -12375,11 +12375,11 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa FUNC_ENTER_NOAPI_NOERR /* Check parameters */ - HDassert(space); + assert(space); hslab = space->select.sel_info.hslab; - HDassert(hslab); - HDassert(hslab->unlim_dim >= 0); - HDassert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED); + assert(hslab); + assert(hslab->unlim_dim >= 0); + assert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED); diminfo = &hslab->diminfo.opt[hslab->unlim_dim]; |