diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /src/H5Shyper.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r-- | src/H5Shyper.c | 974 |
1 files changed, 487 insertions, 487 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index ad77ce8..de5668d 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -296,12 +296,12 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de FUNC_ENTER_PACKAGE_NOERR while (span) { - HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__, - depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next); + fprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__, + depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next); if (span->down) { - HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", - __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count, - span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head); + fprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", + __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count, + span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head); H5S__hyper_print_spans_helper(f, span->down->head, depth + 1); } /* end if */ span = span->next; @@ -316,9 +316,9 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst) FUNC_ENTER_PACKAGE_NOERR if (span_lst != NULL) { - HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", - __func__, (void *)span_lst, span_lst->count, span_lst->low_bounds[0], - span_lst->high_bounds[0], (void *)span_lst->head); + fprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", __func__, + (void *)span_lst, span_lst->count, span_lst->low_bounds[0], span_lst->high_bounds[0], + (void *)span_lst->head); H5S__hyper_print_spans_helper(f, span_lst->head, 0); } /* end if */ @@ -343,21 +343,21 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons FUNC_ENTER_PACKAGE_NOERR if (dinfo != NULL) { - HDfprintf(f, "%s: %s: start=[", __func__, field); + fprintf(f, "%s: %s: start=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n")); - HDfprintf(f, "%s: %s: stride=[", __func__, field); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%s: %s: stride=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n")); - HDfprintf(f, "%s: %s: count=[", __func__, field); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%s: %s: count=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n")); - HDfprintf(f, "%s: %s: block=[", __func__, field); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%s: %s: block=[", __func__, field); for (u = 0; u < ndims; u++) - HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n")); + fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n")); } /* end if */ else - HDfprintf(f, "%s: %s==NULL\n", __func__, field); + fprintf(f, "%s: %s==NULL\n", __func__, field); FUNC_LEAVE_NOAPI(SUCCEED) } @@ -404,7 +404,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; @@ -412,32 +412,32 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig } /* end while */ for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth, - span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail, - (span_lst->tail == actual_tail)); + fprintf(f, "\t"); + fprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth, + span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail, + (span_lst->tail == actual_tail)); for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "low_bounds=["); + fprintf(f, "\t"); + fprintf(f, "low_bounds=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]); for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "high_bounds=["); + fprintf(f, "\t"); + fprintf(f, "high_bounds=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]); cur_elem = span_lst->head; elem_idx = 0; while (cur_elem) { for (u = 0; u < depth; u++) - HDfprintf(f, "\t"); - HDfprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++, - (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down); + fprintf(f, "\t"); + fprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++, + (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down); if (cur_elem->down) H5S__hyper_print_spans_dfs(f, cur_elem->down, depth + 1, dims); cur_elem = cur_elem->next; @@ -471,39 +471,39 @@ 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, - space->select.offset_changed); + fprintf(f, "=======================\n"); + fprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims, + space->select.offset_changed); - HDfprintf(f, " offset=["); + fprintf(f, " offset=["); for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%lld,", space->select.offset[u]); - HDfprintf(f, "%lld]\n", space->select.offset[dims - 1]); + fprintf(f, "%lld,", space->select.offset[u]); + fprintf(f, "%lld]\n", space->select.offset[dims - 1]); - HDfprintf(f, " low_bounds=["); + fprintf(f, " low_bounds=["); if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]); } /* end if */ else { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]); } /* end else */ - HDfprintf(f, " high_bounds=["); + fprintf(f, " high_bounds=["); if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]); } /* end if */ else { for (u = 0; u < dims - 1; u++) - HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]); - HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]); + fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]); + fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]); } /* end else */ /* Print out diminfo, if it's valid */ @@ -513,7 +513,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space) /* Start print out the highest-order of dimension */ if (hslab->span_lst) H5S__hyper_print_spans_dfs(f, hslab->span_lst, 0, dims); - HDfprintf(f, "=======================\n\n"); + fprintf(f, "=======================\n\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_print_space_dfs() */ @@ -573,9 +573,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; @@ -639,7 +639,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 */ @@ -731,7 +731,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 */ @@ -740,8 +740,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; @@ -802,8 +802,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 */ @@ -832,7 +832,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]), @@ -846,7 +846,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]; @@ -857,7 +857,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); @@ -892,9 +892,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 */ @@ -935,7 +935,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() */ @@ -966,7 +966,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) { @@ -1178,9 +1178,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++; @@ -1196,7 +1196,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 */ @@ -1355,9 +1355,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++; @@ -1373,7 +1373,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 */ @@ -1437,13 +1437,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; @@ -1516,7 +1516,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; @@ -1593,9 +1593,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++; @@ -1615,7 +1615,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++) @@ -1623,7 +1623,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 */ @@ -1632,7 +1632,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; @@ -1795,15 +1795,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++; @@ -1823,7 +1823,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 */ @@ -1910,13 +1910,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; @@ -1953,8 +1953,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 @@ -2137,7 +2137,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 { @@ -2273,7 +2273,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 */ @@ -2349,13 +2349,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; @@ -2428,8 +2428,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; @@ -2546,8 +2546,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; @@ -2567,8 +2567,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() */ @@ -2612,14 +2612,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) { @@ -2765,7 +2765,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) @@ -2849,8 +2849,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))) @@ -2896,7 +2896,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) { @@ -2987,7 +2987,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(); @@ -3051,8 +3051,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) { @@ -3184,7 +3184,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) @@ -3233,8 +3233,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))) @@ -3302,7 +3302,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) @@ -3358,7 +3358,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) @@ -3462,8 +3462,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) */ @@ -3608,7 +3608,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver FUNC_ENTER_PACKAGE /* Get bounding box for the selection */ - HDmemset(bounds_end, 0, sizeof(bounds_end)); + memset(bounds_end, 0, sizeof(bounds_end)); if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */ /* Get bounding box for the selection */ @@ -3704,7 +3704,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++) @@ -3754,7 +3754,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 */ @@ -3796,12 +3796,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)> + @@ -3851,11 +3851,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; @@ -3923,7 +3923,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 */ @@ -3984,10 +3984,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; @@ -4029,13 +4029,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); @@ -4051,7 +4051,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); @@ -4067,7 +4067,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); @@ -4090,7 +4090,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; @@ -4171,19 +4171,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; @@ -4256,9 +4256,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 @@ -4325,7 +4325,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb if (!*space) { /* Patch the rank of the allocated dataspace */ - HDmemset(dims, 0, (size_t)rank * sizeof(dims[0])); + memset(dims, 0, (size_t)rank * sizeof(dims[0])); if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions") } /* end if */ @@ -4340,8 +4340,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) { @@ -4565,13 +4565,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; @@ -4662,9 +4662,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. @@ -4737,7 +4737,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); @@ -4901,9 +4901,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) { @@ -4922,7 +4922,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) @@ -4978,8 +4978,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; @@ -5044,7 +5044,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 @@ -5111,8 +5111,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) @@ -5152,7 +5152,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) */ @@ -5337,7 +5337,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 @@ -5411,7 +5411,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. @@ -5463,10 +5463,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 @@ -5485,8 +5485,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) { @@ -5573,13 +5573,13 @@ 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)); - HDmemset(rest_zeros, 0, sizeof(rest_zeros)); + memset(offset, 0, sizeof(offset)); + memset(rest_zeros, 0, sizeof(rest_zeros)); /* Check for an offset between the two selections */ span1 = span_info1->head; @@ -5597,7 +5597,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) { @@ -5619,7 +5619,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 @@ -5668,16 +5668,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 */ @@ -5766,7 +5766,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; @@ -5806,7 +5806,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; @@ -5852,8 +5852,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) { @@ -5919,10 +5919,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; @@ -5938,7 +5938,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") @@ -5983,14 +5983,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; @@ -6043,13 +6043,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; @@ -6105,7 +6105,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 */ @@ -6167,10 +6167,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) { @@ -6263,9 +6263,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) { @@ -6350,10 +6350,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. @@ -6400,7 +6400,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. @@ -6481,8 +6481,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) { @@ -6491,7 +6491,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 */ @@ -6500,7 +6500,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; @@ -6546,8 +6546,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++) @@ -6562,11 +6562,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 */ @@ -6611,8 +6611,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) */ @@ -6624,11 +6624,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; @@ -6643,9 +6643,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; @@ -6689,16 +6689,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; @@ -6740,9 +6740,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; @@ -6765,7 +6765,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") @@ -6800,7 +6800,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; @@ -6840,9 +6840,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) @@ -6869,7 +6869,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of hsize_t block[H5S_MAX_RANK]; /* Block selected in base dataspace */ /* Compute the offset for the down-projection */ - HDmemset(block, 0, sizeof(block)); + memset(block, 0, sizeof(block)); for (u = 0; u < (base_space->extent.rank - new_space->extent.rank); u++) block[u] = opt_diminfo[u].start; *offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block); @@ -6879,7 +6879,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; @@ -6952,7 +6952,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of unsigned curr_dim; /* Current dimension being operated on */ /* Clear the block buffer */ - HDmemset(block, 0, sizeof(block)); + memset(block, 0, sizeof(block)); /* Advance down selected spans */ curr = base_space->select.sel_info.hslab->span_lst->head; @@ -6975,7 +6975,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; @@ -7028,8 +7028,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) { @@ -7038,7 +7038,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 */ @@ -7047,7 +7047,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); @@ -7093,8 +7093,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++) @@ -7109,12 +7109,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] = @@ -7169,8 +7169,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) { @@ -7187,7 +7187,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection") /* Zero out the selection offset */ - HDmemset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank); + memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank); /* Indicate that the offset was normalized */ ret_value = TRUE; @@ -7226,8 +7226,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) @@ -7271,7 +7271,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) { @@ -7295,7 +7295,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)); @@ -7320,7 +7320,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) { @@ -7345,8 +7345,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) */ @@ -7431,11 +7431,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); @@ -7539,8 +7539,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) { @@ -7569,7 +7569,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, @@ -7584,7 +7584,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, @@ -7599,7 +7599,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, @@ -7653,8 +7653,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) { @@ -7679,7 +7679,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, @@ -7694,7 +7694,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, @@ -7709,7 +7709,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, @@ -7760,8 +7760,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) { @@ -7786,7 +7786,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, @@ -7801,7 +7801,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, @@ -7816,7 +7816,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, @@ -7877,8 +7877,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) { @@ -7903,7 +7903,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, @@ -7918,7 +7918,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, @@ -7933,7 +7933,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, @@ -8037,7 +8037,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 */ @@ -8077,7 +8077,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)) { @@ -8410,8 +8410,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) { @@ -8465,7 +8465,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) @@ -8535,7 +8535,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(); @@ -8579,8 +8579,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); @@ -8635,11 +8635,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--) { @@ -8783,8 +8783,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) */ @@ -8939,13 +8939,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; @@ -9000,7 +9000,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; @@ -9026,7 +9026,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) */ @@ -9099,8 +9099,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) */ @@ -9152,8 +9152,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++) { @@ -9206,8 +9206,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], @@ -9223,7 +9223,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)) @@ -9251,8 +9251,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: @@ -9303,13 +9303,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; @@ -9372,7 +9372,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) @@ -9455,7 +9455,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) @@ -9482,7 +9482,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) */ @@ -9505,7 +9505,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) */ @@ -9588,12 +9588,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))) @@ -9629,7 +9629,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++) { @@ -9680,14 +9680,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) @@ -9781,9 +9781,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; @@ -9939,7 +9939,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; @@ -10014,10 +10014,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) @@ -10098,8 +10098,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]; @@ -10117,7 +10117,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, @@ -10128,7 +10128,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 */ @@ -10234,7 +10234,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) { @@ -10260,14 +10260,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 */ @@ -10413,12 +10413,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) @@ -10603,14 +10603,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, @@ -10619,7 +10619,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) @@ -10717,9 +10717,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) @@ -10858,9 +10858,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) @@ -11008,14 +11008,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) { @@ -11038,11 +11038,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; @@ -11073,7 +11073,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 @@ -11082,9 +11082,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; @@ -11108,7 +11108,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 */ @@ -11128,7 +11128,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 */ @@ -11140,7 +11140,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) { @@ -11223,11 +11223,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) @@ -11251,7 +11251,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], @@ -11263,7 +11263,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 { @@ -11277,9 +11277,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; @@ -11289,7 +11289,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)) { @@ -11364,16 +11364,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], @@ -11392,14 +11392,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; @@ -11407,7 +11407,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; @@ -11484,7 +11484,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; @@ -11513,7 +11513,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) { @@ -11539,7 +11539,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) @@ -11547,7 +11547,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) @@ -11574,7 +11574,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; @@ -11614,18 +11614,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 { @@ -11635,9 +11635,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; @@ -11719,18 +11719,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) { @@ -11745,7 +11745,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, @@ -11767,7 +11767,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, @@ -11784,7 +11784,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i /* Initialize udata */ /* We will use op_info[0] for nelem and op_info[1] for copied spans */ - HDmemset(&udata, 0, sizeof(udata)); + memset(&udata, 0, sizeof(udata)); udata.ds_span[0] = ds_span_info->head; udata.ds_low[0] = udata.ds_span[0]->low; udata.ss_rank = H5S_GET_EXTENT_NDIMS(src_space); @@ -11865,7 +11865,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 */ @@ -11915,11 +11915,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 @@ -11958,11 +11958,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; @@ -12003,7 +12003,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]; @@ -12012,7 +12012,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Last block is partial, need to construct compound selection */ /* Fill start with zeros */ - HDmemset(start, 0, sizeof(start)); + memset(start, 0, sizeof(start)); /* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in * others so only unlimited dimension is clipped */ @@ -12089,9 +12089,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]; @@ -12104,7 +12104,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; @@ -12156,20 +12156,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 */ @@ -12213,14 +12213,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]; @@ -12242,12 +12242,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 */ @@ -12296,11 +12296,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 @@ -12374,11 +12374,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]; |