summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff.h
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-20 19:21:03 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-20 19:21:03 (GMT)
commit4cb6c01d7f59be968649e36a61346be044f76345 (patch)
treee0a0b81e542768b75d5bbb2de8afc1abfb8c4370 /tools/lib/h5diff.h
parent00909f278d64017c21c8348537231daba97be9dd (diff)
downloadhdf5-4cb6c01d7f59be968649e36a61346be044f76345.zip
hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.gz
hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.bz2
[svn-r8904] Purpose:
h5diff and h5repack changes Description: h5diff introduced the following four modes of output: Normal mode: print the number of differences found and where they occured Report mode: print the above plus the differences Verbose mode: print the above plus a list of objects and warnings Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) h5repack added an extra parameter for SZIP filter (coding method) the new syntax is -f SZIP=<pixels per block,coding> (pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN') Example of use: ./h5repack -i file1 -o file2 -f SZIP=8,NN -v updated usage messages, test scripts and files accordingly Solution: Platforms tested: linux AIX solaris Misc. update:
Diffstat (limited to 'tools/lib/h5diff.h')
-rw-r--r--tools/lib/h5diff.h171
1 files changed, 108 insertions, 63 deletions
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index 0c52f76..4c56f81 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -18,6 +18,9 @@
#include "hdf5.h"
#include "h5trav.h"
+typedef H5G_obj_t H5G_obj_t1;
+
+
#if 0
#define H5DIFF_DEBUG
@@ -51,14 +54,18 @@
*/
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 */
+ int m_quiet; /* quiet mide: no output at all */
+ int m_report; /* report mode: print the data */
+ int m_verbose; /* verbose mode: print the data, list of objcets, warnings */
+ int d; /* delta, absolute value to compare */
+ double delta; /* delta value */
+ int p; /* relative error to compare*/
+ double percent; /* relative error value */
+ int n; /* count, compare up to count */
+ int count; /* count value */
+ int err_stat; /* an error ocurred (1, error, 0, no error) */
+ int cmn_objs; /* do we have comparable objects */
+
} diff_opt_t;
@@ -72,11 +79,11 @@ typedef struct {
extern "C" {
#endif
-int h5diff(const char *fname1,
- const char *fname2,
- const char *objname1,
- const char *objname2,
- diff_opt_t *options);
+hsize_t h5diff(const char *fname1,
+ const char *fname2,
+ const char *objname1,
+ const char *objname2,
+ diff_opt_t *options);
#ifdef __cplusplus
@@ -91,56 +98,56 @@ int h5diff(const char *fname1,
*/
-int diff_dataset( hid_t file1_id,
- hid_t file2_id,
- const char *obj1_name,
- const char *obj2_name,
- diff_opt_t *options );
+hsize_t diff_dataset( hid_t file1_id,
+ hid_t file2_id,
+ const char *obj1_name,
+ const char *obj2_name,
+ diff_opt_t *options );
-int diff_datasetid( hid_t dset1_id,
- hid_t dset2_id,
- const char *obj1_name,
- const char *obj2_name,
+hsize_t diff_datasetid( hid_t dset1_id,
+ hid_t dset2_id,
+ const char *obj1_name,
+ const char *obj2_name,
+ diff_opt_t *options );
+
+hsize_t diff( hid_t file1_id,
+ const char *path1,
+ hid_t file2_id,
+ const char *path2,
+ diff_opt_t *options,
+ H5G_obj_t1 type );
+
+hsize_t diff_compare( hid_t file1_id,
+ const char *file1_name,
+ const char *obj1_name,
+ int nobjects1,
+ trav_info_t *info1,
+ hid_t file2_id,
+ const char *file2_name,
+ const char *obj2_name,
+ int nobjects2,
+ trav_info_t *info2,
+ diff_opt_t *options );
+
+hsize_t diff_match( hid_t file1_id,
+ int nobjects1,
+ trav_info_t *info1,
+ hid_t file2_id,
+ int nobjects2,
+ trav_info_t *info2,
diff_opt_t *options );
-int diff( hid_t file1_id,
- const char *path1,
- hid_t file2_id,
- const char *path2,
- diff_opt_t *options,
- H5G_obj_t type );
-
-int diff_compare( hid_t file1_id,
- const char *file1_name,
- const char *obj1_name,
- int nobjects1,
- trav_info_t *info1,
- hid_t file2_id,
- const char *file2_name,
- const char *obj2_name,
- int nobjects2,
- trav_info_t *info2,
- diff_opt_t *options );
-
-int diff_match( hid_t file1_id,
- int nobjects1,
- trav_info_t *info1,
- hid_t file2_id,
- int nobjects2,
- trav_info_t *info2,
- diff_opt_t *options );
-
-int diff_array( void *_mem1,
- void *_mem2,
- hsize_t nelmts,
- int rank,
- hsize_t *dims,
- diff_opt_t *options,
- const char *name1,
- const char *name2,
- hid_t m_type,
- hid_t container1_id,
- hid_t container2_id); /* dataset where the reference came from*/
+hsize_t diff_array( void *_mem1,
+ void *_mem2,
+ hsize_t nelmts,
+ int rank,
+ hsize_t *dims,
+ diff_opt_t *options,
+ const char *name1,
+ const char *name2,
+ hid_t m_type,
+ hid_t container1_id,
+ hid_t container2_id); /* dataset where the reference came from*/
int diff_can_type( hid_t f_type1, /* file data type */
@@ -169,6 +176,7 @@ int diff_attr(hid_t loc1_id,
*-------------------------------------------------------------------------
*/
+void print_found(hsize_t nfound);
void print_type(hid_t type);
const char* diff_basename(const char *name);
const char* get_type(int type);
@@ -184,15 +192,52 @@ void print_pos( int *ph,
const char *obj1,
const char *obj2 );
+int print_objname(diff_opt_t *options, hsize_t nfound);
+
+
#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 diff_list( const char *filename, int nobjects, trav_info_t *info );
-#endif /* NOT_YET */
+
+hsize_t diff_native_uchar(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t i,
+ int rank,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+
+
+hsize_t diff_char(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t i,
+ int rank,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+
+hsize_t diff_datum(void *_mem1,
+ void *_mem2,
+ hid_t m_type,
+ hsize_t i,
+ int rank,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ hid_t container1_id,
+ hid_t container2_id, /*where the reference came from*/
+ int *ph); /*print header */