diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-29 20:27:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-29 20:27:31 (GMT) |
commit | a88d81f4ba6fdd08d7255a736b9e2954b0cef0ca (patch) | |
tree | 7a4afc2e68b372f3c16d65fe0da305eeb4f0f31d /src/H5Shyper.c | |
parent | 03a08823e78de11a77eaf99b97569fe9600c9a04 (diff) | |
download | hdf5-a88d81f4ba6fdd08d7255a736b9e2954b0cef0ca.zip hdf5-a88d81f4ba6fdd08d7255a736b9e2954b0cef0ca.tar.gz hdf5-a88d81f4ba6fdd08d7255a736b9e2954b0cef0ca.tar.bz2 |
[svn-r5286] Purpose:
Bug Fix
Description:
Selection offsets were not being used correctly when iterating through
all hyperslabs selections and point selections.
Solution:
Use the selection offset appropriately.
Platforms tested:
FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r-- | src/H5Shyper.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index b9652c0..98ffc35 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -5893,7 +5893,7 @@ H5S_hyper_select_iterate_mem_gen(H5S_hyper_iter_info_t *iter_info) off_arr[i]=iter->hyp.span[i]->low; /* Compute the sequential element offset */ - loc_off+=off_arr[i]*slab[i]; + loc_off+=(off_arr[i]+space->select.offset[i])*slab[i]; } /* end for */ /* Perform the I/O on the elements, based on the position of the iterator */ @@ -6008,7 +6008,7 @@ H5S_hyper_select_iterate_mem_gen(H5S_hyper_iter_info_t *iter_info) /* Reset the buffer offset */ for(i=0, loc_off=0; i<ndims; i++) - loc_off+=off_arr[i]*slab[i]; + loc_off+=(off_arr[i]+space->select.offset[i])*slab[i]; } /* end else */ } /* end while */ @@ -6102,12 +6102,12 @@ H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t UNUSED *iter, void *buf, hid_t t for(u=0; u<ndims; u++) { tmp_count[u]=diminfo[u].count; tmp_block[u]=diminfo[u].block; - offset[u]=diminfo[u].start; + offset[u]=(diminfo[u].start+space->select.offset[u]); } /* end for */ /* Initialize the starting location */ for(loc=buf,u=0; u<ndims; u++) - loc+=diminfo[u].start*slab[u]; + loc+=offset[u]*slab[u]; /* Go iterate over the hyperslabs */ while(user_ret==0) { @@ -6185,7 +6185,7 @@ H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t UNUSED *iter, void *buf, hid_t t /* Re-compute buffer location & offset array */ for(loc=buf,u=0; u<ndims; u++) { - temp_off=diminfo[u].start + temp_off=(diminfo[u].start+space->select.offset[u]) +diminfo[u].stride*(diminfo[u].count-tmp_count[u]) +(diminfo[u].block-tmp_block[u]); loc+=temp_off*slab[u]; |