summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2019-06-03 17:42:22 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2019-06-03 17:42:22 (GMT)
commit45daa3d168f110ad26d390b9aa0fed419e20071c (patch)
tree2a7be78e8e82f4b4ee5e66c261d1ca48915a4379
parent35a8a549f6714533b100ca1512979165c0a0f359 (diff)
downloadhdf5-45daa3d168f110ad26d390b9aa0fed419e20071c.zip
hdf5-45daa3d168f110ad26d390b9aa0fed419e20071c.tar.gz
hdf5-45daa3d168f110ad26d390b9aa0fed419e20071c.tar.bz2
Minor fixes/improvements for VDS performance improvement (HDFFV-10693).
-rw-r--r--src/H5Shyper.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 00cb7e9..63f457b 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -50,7 +50,7 @@
*/
/* (Assumes that low & high bounds are _inclusive_) */
#define H5S_RANGE_OVERLAP(L1, H1, L2, H2) \
- !((L1) > (H2) || (L2) > (H1))
+ (!((L1) > (H2) || (L2) > (H1)))
/* Flags for which hyperslab fragments to compute */
#define H5S_HYPER_COMPUTE_B_NOT_A 0x01
@@ -112,7 +112,7 @@ typedef struct {
* (ps_clean_bitmap) works. If H5S_MAX_RANK increases either increase the size
* of ps_clean_bitmap or change the algorithm to use an array. */
#if H5S_MAX_RANK > 32
-#error H5S_MAX_RANK too small for ps_clean_bitmap field in H5S_hyper_project_intersect_ud_t struct
+#error H5S_MAX_RANK too large for ps_clean_bitmap field in H5S_hyper_project_intersect_ud_t struct
#endif
@@ -10893,7 +10893,7 @@ H5S__hyper_proj_int_iterate(const H5S_hyper_span_info_t *ss_span_info,
H5S_HYPER_PROJ_INT_ADD_SKIP(udata, sis_low - ss_low, FAIL);
} /* end if */
else
- low = ss_span->low;
+ low = ss_low;
/* Add overlapping elements */
udata->nelem += high - low + 1;
@@ -10952,20 +10952,22 @@ H5S__hyper_proj_int_iterate(const H5S_hyper_span_info_t *ss_span_info,
if(ss_span && !((depth == 0) && (u == count - 1))) {
/* Count remaining elements in ss_span_info */
- if(ss_span->down)
- do {
- H5S_HYPER_PROJ_INT_ADD_SKIP(udata, H5S__hyper_spans_nelem_helper(ss_span->down, udata->op_gen) * (ss_span->high - ss_low + 1), FAIL);
+ if(ss_span->down) {
+ H5S_HYPER_PROJ_INT_ADD_SKIP(udata, H5S__hyper_spans_nelem_helper(ss_span->down, udata->op_gen) * (ss_span->high - ss_low + 1), FAIL);
+ ss_span = ss_span->next;
+ while(ss_span) {
+ H5S_HYPER_PROJ_INT_ADD_SKIP(udata, H5S__hyper_spans_nelem_helper(ss_span->down, udata->op_gen) * (ss_span->high - ss_span->low + 1), FAIL);
ss_span = ss_span->next;
- if(ss_span)
- ss_low = ss_span->low;
- } while(ss_span);
- else
- do {
- H5S_HYPER_PROJ_INT_ADD_SKIP(udata, ss_span->high - ss_low + 1, FAIL);
+ } /* end while */
+ } /* end if */
+ else {
+ H5S_HYPER_PROJ_INT_ADD_SKIP(udata, ss_span->high - ss_low + 1, FAIL);
+ ss_span = ss_span->next;
+ while(ss_span) {
+ H5S_HYPER_PROJ_INT_ADD_SKIP(udata, ss_span->high - ss_span->low + 1, FAIL);
ss_span = ss_span->next;
- if(ss_span)
- ss_low = ss_span->low;
- } while(ss_span);
+ } /* end while */
+ } /* end else */
} /* end if */
/* Check if the projected space was not changed since we started the