summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: