mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r493] Fixed a bug when iterating through hyperslabs with greater than 2 dimensions.
This commit is contained in:
parent
e0c9ca3cce
commit
e350a69a55
@ -1443,15 +1443,18 @@ printf("%s: check 5.0, nelmts=%d, smine_start=%d, smine_nelmts=%d\n",FUNC,(int)n
|
||||
}
|
||||
#ifdef QAK
|
||||
printf("%s: check 6.0\n",FUNC);
|
||||
#endif /* QAK */
|
||||
#ifdef QAK
|
||||
printf("%s: check 6.5\n",FUNC);
|
||||
{
|
||||
int i;
|
||||
int *b;
|
||||
uint8 *b;
|
||||
|
||||
if(qak_debug) {
|
||||
b=tconv_buf;
|
||||
printf("\ntconv_buf:");
|
||||
for (i=0; i<smine_nelmts; i++,b++) {
|
||||
printf("(%d)%d ",i,*b);
|
||||
printf("(%d)%u ",i,(unsigned)*b);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
@ -373,6 +373,10 @@ printf("%s: check 3.0, num_regions=%d\n",FUNC,(int)num_regions);
|
||||
printf("%s: check 4.0, dim=%d, location=%d\n",FUNC,dim,j);
|
||||
#endif /* QAK */
|
||||
|
||||
/* If we are moving to a new position in this dim, reset the next lower dim. location */
|
||||
if(fhyper_info->iter->hyp.pos[dim]!=j)
|
||||
fhyper_info->iter->hyp.pos[dim+1]=(-1);
|
||||
|
||||
/* Set the correct position we are working on */
|
||||
fhyper_info->iter->hyp.pos[dim]=j;
|
||||
|
||||
@ -588,6 +592,10 @@ H5S_hyper_fwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
|
||||
/* Step through each location in each region */
|
||||
for(j=regions[i].start; j<=regions[i].end && fhyper_info->nelmts>0; j++) {
|
||||
|
||||
/* If we are moving to a new position in this dim, reset the next lower dim. location */
|
||||
if(fhyper_info->iter->hyp.pos[dim]!=j)
|
||||
fhyper_info->iter->hyp.pos[dim+1]=(-1);
|
||||
|
||||
/* Set the correct position we are working on */
|
||||
fhyper_info->iter->hyp.pos[dim]=j;
|
||||
|
||||
@ -817,6 +825,10 @@ printf("%s: check 3.0, num_regions=%d\n",FUNC,(int)num_regions);
|
||||
printf("%s: check 4.0, dim=%d, location=%d\n",FUNC,dim,j);
|
||||
#endif /* QAK */
|
||||
|
||||
/* If we are moving to a new position in this dim, reset the next lower dim. location */
|
||||
if(fhyper_info->iter->hyp.pos[dim]!=j)
|
||||
fhyper_info->iter->hyp.pos[dim+1]=(-1);
|
||||
|
||||
/* Set the correct position we are working on */
|
||||
fhyper_info->iter->hyp.pos[dim]=j;
|
||||
|
||||
@ -1054,6 +1066,10 @@ printf("%s: check 3.0\n",FUNC);
|
||||
/* Step through each location in each region */
|
||||
for(j=regions[i].start; j<=regions[i].end && fhyper_info->nelmts>0; j++) {
|
||||
|
||||
/* If we are moving to a new position in this dim, reset the next lower dim. location */
|
||||
if(fhyper_info->iter->hyp.pos[dim]!=j)
|
||||
fhyper_info->iter->hyp.pos[dim+1]=(-1);
|
||||
|
||||
/* Set the correct position we are working on */
|
||||
fhyper_info->iter->hyp.pos[dim]=j;
|
||||
|
||||
|
@ -207,7 +207,7 @@ herr_t H5S_close (H5S_t *ds);
|
||||
hsize_t H5S_extent_npoints (const H5S_t *ds);
|
||||
hsize_t H5S_get_npoints_max(const H5S_t *ds);
|
||||
intn H5S_extent_ndims (const H5S_t *ds);
|
||||
intn H5S_get_dims (const H5S_t *ds, hsize_t dims[]/*out*/,
|
||||
intn H5S_extent_dims (const H5S_t *ds, hsize_t dims[]/*out*/,
|
||||
hsize_t max_dims[]/*out*/);
|
||||
herr_t H5S_modify (H5G_entry_t *ent, const H5S_t *space);
|
||||
H5S_t *H5S_read (H5G_entry_t *ent);
|
||||
|
@ -50,7 +50,7 @@ hid_t H5Scopy (hid_t space_id);
|
||||
herr_t H5Sclose (hid_t space_id);
|
||||
hsize_t H5Sextent_npoints (hid_t space_id);
|
||||
int H5Sextent_ndims (hid_t space_id);
|
||||
int H5Sget_dims (hid_t space_id, hsize_t dims[], hsize_t maxdims[]);
|
||||
int H5Sextent_dims (hid_t space_id, hsize_t dims[], hsize_t maxdims[]);
|
||||
hbool_t H5Sis_simple (hid_t space_id);
|
||||
herr_t H5Sset_space (hid_t space_id, int rank, const hsize_t *dims);
|
||||
hsize_t H5Sselect_npoints (hid_t spaceid);
|
||||
|
@ -27,7 +27,7 @@
|
||||
/* Version numbers */
|
||||
#define H5_VERS_MAJOR 1 /* For major interface changes */
|
||||
#define H5_VERS_MINOR 0 /* For minor interface changes */
|
||||
#define H5_VERS_RELEASE 14 /* For interface tweaks & bug-fixes */
|
||||
#define H5_VERS_RELEASE 17 /* For interface tweaks & bug-fixes */
|
||||
#define H5_VERS_PATCH 0 /* For small groups of bug fixes */
|
||||
|
||||
#define H5check() H5vers_check(H5_VERS_MAJOR,H5_VERS_MINOR,\
|
||||
|
Loading…
x
Reference in New Issue
Block a user