summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 0c9371e..9eef5ba 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -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;