summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2003-10-22 21:56:21 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2003-10-22 21:56:21 (GMT)
commitac104ba0a7b3a9547f81a970b445505788fb2dcb (patch)
tree008d3f412e033921778917edd8871d5c3c32ddcd /tools/h5diff
parent9ad2479dd4a207f0c1e8f66b1155a6d364f16c07 (diff)
downloadhdf5-ac104ba0a7b3a9547f81a970b445505788fb2dcb.zip
hdf5-ac104ba0a7b3a9547f81a970b445505788fb2dcb.tar.gz
hdf5-ac104ba0a7b3a9547f81a970b445505788fb2dcb.tar.bz2
[svn-r7706] Purpose:
h5diff now has a .h file. which I forgot to CVS add previously Misc. update:
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/h5diff.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/tools/h5diff/h5diff.h b/tools/h5diff/h5diff.h
new file mode 100644
index 0000000..6a244e8
--- /dev/null
+++ b/tools/h5diff/h5diff.h
@@ -0,0 +1,134 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef H5DIFF_H__
+#define H5DIFF_H__
+
+#include "hdf5.h"
+#include "h5trav.h"
+
+
+#if 0
+#define H5DIFF_DEBUG
+#endif
+
+
+/*-------------------------------------------------------------------------
+ * printf formatting
+ *-------------------------------------------------------------------------
+ */
+
+#define FFORMAT "%-15.10g %-15.10g %-15.10g\n"
+#define IFORMAT "%-15d %-15d %-15d\n"
+#define UIFORMAT "%-15u %-15u %-15u\n"
+#define LIFORMAT "%-15ld %-15ld %-15ld\n"
+#define ULIFORMAT "%-15lu %-15lu %-15lu\n"
+/* with -p option */
+#define FPFORMAT "%-15.10g %-15.10g %-15.10g %-14.10g\n"
+#define IPFORMAT "%-15d %-15d %-15d %-14d\n"
+#define UIPFORMAT "%-15u %-15u %-15u %-14u\n"
+#define LPIFORMAT "%-15ld %-15ld %-15ld %-14ld\n"
+#define ULPIFORMAT "%-15lu %-15lu %-15lu %-14lu\n"
+#define SPACES " "
+
+
+/*-------------------------------------------------------------------------
+ * command line options
+ *-------------------------------------------------------------------------
+ */
+
+typedef struct {
+ int r; /* report only what objects differ */
+ int d; /* delta */
+ double delta; /* delta value */
+ int p; /* relative error */
+ double percent; /* relative error value */
+ int n; /* count */
+ int count; /* count value */
+ int verbose; /* print information */
+} options_t;
+
+
+
+/*-------------------------------------------------------------------------
+ * public functions
+ *-------------------------------------------------------------------------
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int h5diff(const char *fname1,
+ const char *fname2,
+ const char *objname1,
+ const char *objname2,
+ options_t options);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+/*-------------------------------------------------------------------------
+ * private functions
+ *-------------------------------------------------------------------------
+ */
+
+
+int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
+ const char *obj2_name, options_t options );
+int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj2_name,
+ options_t options, int type );
+int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
+ int nobjects1, info_t *info1,
+ hid_t file2_id, const char *file2_name, const char *obj2_name,
+ int nobjects2, info_t *info2,
+ options_t options );
+int match( hid_t file1_id, int nobjects1, info_t *info1,
+ hid_t file2_id, int nobjects2, info_t *info2, options_t options );
+int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims,
+ options_t options, const char *obj1, const char *obj2,
+ hid_t m_type );
+
+/*-------------------------------------------------------------------------
+ * utility functions
+ *-------------------------------------------------------------------------
+ */
+
+int h5diff_can_diff( hid_t type_id );
+void print_datatype(hid_t type);
+const char* h5diff_basename(const char *name);
+const char* get_type(int type);
+const char* get_class(H5T_class_t tclass);
+const char* get_sign(H5T_sign_t sign);
+void print_dims( int r, hsize_t *d );
+void print_pos( int *ph, int p, unsigned int curr_pos, int *acc,
+ int *pos, int rank, const char *obj1, const char *obj2 );
+
+#if defined (H5DIFF_DEBUG)
+void print_sizes( const char *obj1, const char *obj2,
+ hid_t f_type1, hid_t f_type2,
+ hid_t m_type1, hid_t m_type2 );
+#endif
+
+#ifdef NOT_YET
+void list( const char *filename, int nobjects, info_t *info );
+#endif /* NOT_YET */
+
+
+
+#endif /* H5DIFF_H__ */