summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-06-12 22:04:35 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-06-12 22:04:35 (GMT)
commit4117cfe2b9e19a79e00c5176f354f906235f1b80 (patch)
treef059fde101de2ba0463c8a63c305ee8d240fc48b /src/H5Shyper.c
parent78e128c544064ba4861a3eb7a72908e7ae7916eb (diff)
downloadhdf5-4117cfe2b9e19a79e00c5176f354f906235f1b80.zip
hdf5-4117cfe2b9e19a79e00c5176f354f906235f1b80.tar.gz
hdf5-4117cfe2b9e19a79e00c5176f354f906235f1b80.tar.bz2
[svn-r27197] Improve performance of "printf" VDS with selections in the file space - the
library no longer iterates over all source datasets in the printf mapping, it now only looks at the ones that could be involved in I/O (the ones whose bounds overlap with the selection in the unlimited dimension). Tested: ummon
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index db81211..fb34981 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -10180,25 +10180,27 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size,
HDassert(hslab);
HDassert(hslab->unlim_dim >= 0);
HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED);
- HDassert(partial);
diminfo = &hslab->opt_unlim_diminfo[hslab->unlim_dim];
/* Check for selection outside of clip_size */
if(diminfo->start >= clip_size) {
ret_value = 0;
- partial = FALSE;
+ if(partial)
+ partial = FALSE;
} /* end if */
else {
/* Calculate index of first incomplete block */
ret_value = (clip_size - diminfo->start + diminfo->stride
- diminfo->block) / diminfo->stride;
- /* Check for partial block */
- if((diminfo->stride * ret_value) < (clip_size - diminfo->start))
- *partial = TRUE;
- else
- *partial = FALSE;
+ if(partial) {
+ /* Check for partial block */
+ if((diminfo->stride * ret_value) < (clip_size - diminfo->start))
+ *partial = TRUE;
+ else
+ *partial = FALSE;
+ } /* end if */
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)