summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-07-15 21:23:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-07-15 21:23:25 (GMT)
commitc40c53d0af09a8453df6d1a46f37de593d23f0d0 (patch)
treeb28dc7838e2a7738402d7ebad9cff011abbca0cb /src/H5Shyper.c
parent077d7c8c864c5452911117ee6b97c855487ff4cd (diff)
downloadhdf5-c40c53d0af09a8453df6d1a46f37de593d23f0d0.zip
hdf5-c40c53d0af09a8453df6d1a46f37de593d23f0d0.tar.gz
hdf5-c40c53d0af09a8453df6d1a46f37de593d23f0d0.tar.bz2
[svn-r512] Tracked down some problems with the number of dimensions used for point/element
selections and also fixed part of the problem with scalar dataspaces being written/read from the file.
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 9eef5ba..cf8b66d 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -196,6 +196,15 @@ printf("%s: check 2.0, bound_count=%d\n",FUNC,bound_count);
next_dim=dim+1;
for(i=0; i<bound_count; i++) {
+#ifdef QAK
+printf("%s: check 2.1, num_reg=%d, pos[%d]=%d\n",FUNC,(int)num_reg,next_dim,(int)pos[next_dim]);
+ {
+ intn j;
+ for(j=next_dim; j>=0; j--)
+ printf("%s: lo_bound[%d][%d]=%d, hi_bound[%d][%d]=%d\n",
+ FUNC,j,i,(int)lo_bounds[j][i].bound,j,i,(int)hi_bounds[j][i].bound);
+ }
+#endif /* QAK */
/* Check if each boundary overlaps in the higher dimensions */
temp_dim=dim;
while(temp_dim>=0 && pos[temp_dim]>=lo_bounds[temp_dim][i].bound &&
@@ -204,8 +213,14 @@ printf("%s: check 2.0, bound_count=%d\n",FUNC,bound_count);
/* Yes, all previous positions match, this is a valid region */
if(temp_dim<0) {
+#ifdef QAK
+printf("%s: check 3.0\n",FUNC);
+#endif /* QAK */
/* Check if we've allocated the array yet */
if(num_reg==0) {
+#ifdef QAK
+printf("%s: check 3.1\n",FUNC);
+#endif /* QAK */
/* Allocate array */
ret_value=H5MM_malloc(sizeof(H5S_hyper_region_t));
@@ -217,9 +232,16 @@ printf("%s: check 2.0, bound_count=%d\n",FUNC,bound_count);
num_reg++;
} else {
/* Check if we should merge this region into the current region */
- if(lo_bounds[next_dim][i].bound<ret_value[curr_reg].end)
+ if(lo_bounds[next_dim][i].bound<ret_value[curr_reg].end) {
+#ifdef QAK
+printf("%s: check 4.1\n",FUNC);
+#endif /* QAK */
ret_value[curr_reg].end=MAX(hi_bounds[next_dim][i].bound,ret_value[curr_reg].end);
+ }
else { /* no overlap with previous region, add new region */
+#ifdef QAK
+printf("%s: check 4.2\n",FUNC);
+#endif /* QAK */
/* Enlarge array */
ret_value=H5MM_realloc(ret_value,sizeof(H5S_hyper_region_t)*(num_reg+1));
@@ -1061,9 +1083,15 @@ printf("%s: check 3.0\n",FUNC);
/* Increment the dimension we are working with */
dim++;
+#ifdef QAK
+printf("%s: check 6.0, num_regions=%d\n",FUNC,(int)num_regions);
+#endif /* QAK */
/* Step through each region in this dimension */
for(i=0; i<num_regions && fhyper_info->nelmts>0; i++) {
/* Step through each location in each region */
+#ifdef QAK
+printf("%s: check 7.0, start[%d]=%d, end[%d]=%d, nelmts=%d\n",FUNC,i,(int)regions[i].start,i,(int)regions[i].end,(int)fhyper_info->nelmts);
+#endif /* QAK */
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 */