summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-01-28 14:20:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-01-28 14:20:36 (GMT)
commit22a7d4852ad9a3c1b12024c0898748ba360ad9c2 (patch)
treeb365c84e67934288e29d1d51f76bd62cb7615266
parent2102520e90b1a10489f669de16b9b255aba4befd (diff)
downloadhdf5-22a7d4852ad9a3c1b12024c0898748ba360ad9c2.zip
hdf5-22a7d4852ad9a3c1b12024c0898748ba360ad9c2.tar.gz
hdf5-22a7d4852ad9a3c1b12024c0898748ba360ad9c2.tar.bz2
[svn-r183] Added comparison of selected hyperslabs to H5P_cmp
-rw-r--r--src/H5P.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/H5P.c b/src/H5P.c
index b3fc36b..3fab9ca 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -769,6 +769,30 @@ H5P_cmp(const H5P_t *ds1, const H5P_t *ds2)
HRETURN(1);
}
+ /* Check if we should compare hyperslab definitions */
+ if(ds1->hslab_def==TRUE && ds2->hslab_def==TRUE)
+ {
+ for (i = 0; i < ds1->u.simple.rank; i++) {
+ if (ds1->h.start[i] < ds2->h.start[i])
+ HRETURN(-1);
+ if (ds1->h.start[i] > ds2->h.start[i])
+ HRETURN(1);
+ if (ds1->h.count[i] < ds2->h.count[i])
+ HRETURN(-1);
+ if (ds1->h.count[i] > ds2->h.count[i])
+ HRETURN(1);
+ if (ds1->h.stride[i] < ds2->h.stride[i])
+ HRETURN(-1);
+ if (ds1->h.stride[i] > ds2->h.stride[i])
+ HRETURN(1);
+ }
+ } /* end if */
+ else
+ {
+ if(ds1->hslab_def!=ds2->hslab_def)
+ HRETURN(ds1->hslab_def==TRUE ? 1 : -1);
+ } /* end else */
+
break;
default: