diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-09-22 19:28:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-09-22 19:28:05 (GMT) |
commit | 7bd50661fe8096cafb488fc19b9f87fffd69a325 (patch) | |
tree | c321c0e1da0cbdd5d2c82306adf81e20b315cd1d /src/H5Sselect.c | |
parent | 57ed75800a0ff96eeae1d076602b3f89740d7c8c (diff) | |
download | hdf5-7bd50661fe8096cafb488fc19b9f87fffd69a325.zip hdf5-7bd50661fe8096cafb488fc19b9f87fffd69a325.tar.gz hdf5-7bd50661fe8096cafb488fc19b9f87fffd69a325.tar.bz2 |
[svn-r2587] Purpose:
Bug fix (sorta)
Description:
When the stride and block size of a hyperslab selection are equal, the
blocks that are selected are contiguous in the dataset. Prior to my
hyperslab optimizations, this situation used to be detected and somewhat
optimized to improve performance. I've added more code to optimize for
this situation and integrated it with the new hyperslab optimization that
weren't very efficient for that case as they should have been.
Solution:
Detect contiguous hyperslab selections (i.e. block size in a dimension is
the same as the stride in that dimension) and store the optimized,
contiguous version of that hyperslab. We also store the original, un-
optimized version of the hyperslab to give back to the user if they query
the hyperslab selection they just made.
Platforms tested:
FreeBSD 4.1
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r-- | src/H5Sselect.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index fc931e1..f31bba4 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -608,7 +608,7 @@ for(i=0; i<space->extent.u.simple.rank; i++) #endif /*QAK */ /* Check each dimension */ for(ret_value=1,i=0; i<space->extent.u.simple.rank; i++) - ret_value*=space->select.sel_info.hslab.diminfo[i].count; + ret_value*=space->select.sel_info.hslab.app_diminfo[i].count; } /* end if */ else ret_value = (hssize_t)space->select.sel_info.hslab.hyper_lst->count; @@ -784,7 +784,11 @@ H5S_get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numbloc /* Set some convienence values */ ndims=space->extent.u.simple.rank; fast_dim=ndims-1; - diminfo=space->select.sel_info.hslab.diminfo; + /* + * Use the "application dimension information" to pass back to the user + * the blocks they set, not the optimized, internal information. + */ + diminfo=space->select.sel_info.hslab.app_diminfo; /* Build the tables of count sizes as well as the initial offset */ for(i=0; i<ndims; i++) { |