[svn-r5082] Purpose:

Bug Fix
Description:
    When reading a contiguous hyperslab that spanned the entire dataset and
    was larger that the type conversion buffer, the hyperslab routines need
    to fill the type conversion buffer and then return to the I/O routines.

    When the I/O routines resume the hyperslab operation, it was possible to
    have a combination of coordinates which caused the hyperslab iterator
    to incorrectly advance in the file, causing some data to be re-read or
    re-written.

Solution:
    Corrected the H5S_hyper_iter_next routine to correctly handle contiguous
    hyperslabs that span the entire dataset dimensions.

Platforms tested:
    Linux (eirene)
This commit is contained in:
Quincey Koziol 2002-03-26 14:55:28 -05:00
parent 27f0b5a267
commit ccfdf1f9e4

View File

@ -325,8 +325,14 @@ H5S_hyper_iter_next (const H5S_t *file_space, H5S_sel_iter_t *file_iter)
/* Calculate the offset and block count for each dimension */
for(i=0; i<ndims; i++) {
iter_offset[i]=(file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)%file_space->select.sel_info.hslab.diminfo[i].stride;
iter_count[i]=(file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)/file_space->select.sel_info.hslab.diminfo[i].stride;
if(file_space->select.sel_info.hslab.diminfo[i].stride==1) {
iter_offset[i]=file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start;
iter_count[i]=0;
} /* end if */
else {
iter_offset[i]=(file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)%file_space->select.sel_info.hslab.diminfo[i].stride;
iter_count[i]=(file_iter->hyp.pos[i]-file_space->select.sel_info.hslab.diminfo[i].start)/file_space->select.sel_info.hslab.diminfo[i].stride;
} /* end else */
} /* end for */
/* Start with the fastest changing dimension */