diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-03-31 20:20:10 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-03-31 20:20:10 (GMT) |
commit | 95983cbdfe74dc991c190cb04e2ff76202cac31c (patch) | |
tree | 0c3003f7e96082c196266e0b039450e20c4e317a /src/H5Shyper.c | |
parent | 904c84b2a2590124713f4187a074c8d89c79b2c1 (diff) | |
download | hdf5-95983cbdfe74dc991c190cb04e2ff76202cac31c.zip hdf5-95983cbdfe74dc991c190cb04e2ff76202cac31c.tar.gz hdf5-95983cbdfe74dc991c190cb04e2ff76202cac31c.tar.bz2 |
[svn-r26680] Implement minor suggestions from 3/26/15 code review.
Note make check still fails in h5dump test (unrelated to this checkin).
Tested: ummon
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r-- | src/H5Shyper.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 13573e1..51194f9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8963,10 +8963,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Calculate proj_down_dims (note loop relies on unsigned i wrapping around) */ - proj_down_dims[proj_rank - 1] = proj_space->extent.size[proj_rank - 1]; - if(proj_rank > 1) - for(i = proj_rank - 2; i < proj_rank; i--) - proj_down_dims[i] = proj_space->extent.size[i] * proj_down_dims[i + 1]; + if(H5VM_array_down(proj_rank, proj_space->extent.size, proj_down_dims) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't compute 'down' chunk size value") /* Remove current selection from proj_space */ if(H5S_SELECT_RELEASE(proj_space) < 0) @@ -9137,7 +9135,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * the plane of the span currently being built (i.e. it's * finished being built) */ for(i = proj_rank - 1; ((i > 0) - && (((proj_off / proj_down_dims[i]) + && (((proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i]) != curr_span_dim[i - 1])); i--) { if(curr_span_tree[i]) { @@ -9158,7 +9156,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ /* Update curr_span_dim */ - curr_span_dim[i - 1] = (proj_off / proj_down_dims[i]) % proj_space->extent.size[i]; + curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i]; } /* end for */ /* Compute bounds for new span in lowest dimension */ |