summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff.h
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-11-11 15:23:44 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-11-11 15:23:44 (GMT)
commit40d56dd20cc4c1dfad22596135d505cd19915a45 (patch)
tree1fa4b905e56eb7de3a46c6e4a7caa5aa471f83c1 /tools/lib/h5diff.h
parent5d2eb898376adae54a91fe44607d5b59adb5f589 (diff)
downloadhdf5-40d56dd20cc4c1dfad22596135d505cd19915a45.zip
hdf5-40d56dd20cc4c1dfad22596135d505cd19915a45.tar.gz
hdf5-40d56dd20cc4c1dfad22596135d505cd19915a45.tar.bz2
[svn-r19757] Purpose:
Improve h5diff performance. Description: The following changes for improving h5diff performance: 1) use HDmemcmp() before comparing each elements (memcmp() is very fast at both linew and jam) 2) replace the expensive H5Tequals() calls 3) retrieve datatype information at dataset level not each element level for compound datasets Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
Diffstat (limited to 'tools/lib/h5diff.h')
-rw-r--r--tools/lib/h5diff.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index c89b9d3..7e4e016 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -172,6 +172,18 @@ int print_objname(diff_opt_t *options, hsize_t nfound);
void do_print_objname (const char *OBJ, const char *path1, const char *path2);
+/*-------------------------------------------------------------------------
+ * XCAO, 11/10/2010
+ * added to improve performance for compound datasets
+ */
+typedef struct mcomp_t
+{
+ int n; /* number of members */
+ hid_t *ids; /* member type id */
+ unsigned char *flags;
+ size_t *offsets;
+ struct mcomp_t **m; /* members */
+}mcomp_t;
hsize_t diff_datum(void *_mem1,
void *_mem2,
@@ -186,7 +198,8 @@ hsize_t diff_datum(void *_mem1,
const char *obj2,
hid_t container1_id,
hid_t container2_id, /*where the reference came from*/
- int *ph); /*print header */
+ int *ph, /*print header */
+ mcomp_t *members); /*compound members */