summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r--tools/lib/h5diff_array.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 91acb10..6572594 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -74,7 +74,7 @@
#define ULLI_FORMAT_P_NOTCOMP "%-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"u %-15"H5_PRINTF_LL_WIDTH"d not comparable\n"
-/* if system EPSILON is defined, use the system EPSILON; otherwise, use
+/* if system EPSILON is defined, use the system EPSILON; otherwise, use
constants that are close to most EPSILON values */
#ifndef FLT_EPSILON
@@ -167,7 +167,7 @@ static void h5diff_print_char(char ch);
#if H5_SIZEOF_LONG_DOUBLE !=0
typedef enum dtype_t
{
- FLT_FLOAT,
+ FLT_FLOAT,
FLT_DOUBLE,
FLT_LDOUBLE
} dtype_t;
@@ -175,7 +175,7 @@ typedef enum dtype_t
typedef enum dtype_t
{
- FLT_FLOAT,
+ FLT_FLOAT,
FLT_DOUBLE
} dtype_t;
#endif
@@ -227,7 +227,7 @@ hsize_t diff_array( void *_mem1,
if ( rank > 0 )
{
-
+
acc[rank-1]=1;
for(j=(rank-2); j>=0; j--)
{
@@ -275,7 +275,7 @@ hsize_t diff_array( void *_mem1,
*/
case H5T_FLOAT:
-
+
if (H5Tequal(m_type, H5T_NATIVE_FLOAT))
nfound=diff_float(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph);
else if (H5Tequal(m_type, H5T_NATIVE_DOUBLE))
@@ -283,7 +283,7 @@ hsize_t diff_array( void *_mem1,
#if H5_SIZEOF_LONG_DOUBLE !=0
else if (H5Tequal(m_type, H5T_NATIVE_LDOUBLE))
nfound=diff_ldouble(mem1,mem2,nelmts,hyper_start,rank,dims,acc,pos,options,name1,name2,&ph);
-#endif
+#endif
break;
case H5T_INTEGER:
@@ -1862,7 +1862,7 @@ hsize_t diff_datum(void *_mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -1925,7 +1925,7 @@ hsize_t diff_datum(void *_mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -1991,7 +1991,7 @@ hsize_t diff_datum(void *_mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -2074,7 +2074,7 @@ hsize_t diff_datum(void *_mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -2139,7 +2139,7 @@ hsize_t diff_datum(void *_mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -2205,7 +2205,7 @@ hsize_t diff_datum(void *_mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -2889,7 +2889,7 @@ hsize_t diff_float(unsigned char *mem1,
}
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -2961,7 +2961,7 @@ hsize_t diff_float(unsigned char *mem1,
}
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3036,7 +3036,7 @@ hsize_t diff_float(unsigned char *mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3163,7 +3163,7 @@ hsize_t diff_double(unsigned char *mem1,
}
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3235,7 +3235,7 @@ hsize_t diff_double(unsigned char *mem1,
}
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3310,7 +3310,7 @@ hsize_t diff_double(unsigned char *mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3446,7 +3446,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3518,7 +3518,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -3593,7 +3593,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
nfound++;
}
- }
+ }
/* one is NaN, assume difference */
else if ( isnan1==1 || isnan2==1)
{
@@ -5511,14 +5511,14 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
{
if ( options->do_nans )
{
-
+
/*-------------------------------------------------------------------------
* detect NaNs
*-------------------------------------------------------------------------
*/
int isnan1 = my_isnan(FLT_DOUBLE,&value);
int isnan2 = my_isnan(FLT_DOUBLE,&expected);
-
+
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
@@ -5527,7 +5527,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
{
return TRUE;
}
-
+
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
@@ -5535,7 +5535,7 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) )
{
return FALSE;
- }
+ }
}
if (value == expected)
@@ -5564,14 +5564,14 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
{
if ( options->do_nans )
{
-
+
/*-------------------------------------------------------------------------
* detect NaNs
*-------------------------------------------------------------------------
*/
int isnan1 = my_isnan(FLT_LDOUBLE,&value);
int isnan2 = my_isnan(FLT_LDOUBLE,&expected);
-
+
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
@@ -5580,7 +5580,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
{
return TRUE;
}
-
+
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
@@ -5588,7 +5588,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) )
{
return FALSE;
- }
+ }
}
if (value == expected)
@@ -5603,7 +5603,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
}
#endif /* #if H5_SIZEOF_LONG_DOUBLE !=0 */
-
+
/*-------------------------------------------------------------------------
* Function: equal_float
@@ -5621,14 +5621,14 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
{
if ( options->do_nans )
{
-
+
/*-------------------------------------------------------------------------
* detect NaNs
*-------------------------------------------------------------------------
*/
int isnan1 = my_isnan(FLT_FLOAT,&value);
int isnan2 = my_isnan(FLT_FLOAT,&expected);
-
+
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
@@ -5637,7 +5637,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
{
return TRUE;
}
-
+
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
@@ -5645,7 +5645,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
if ( (isnan1 && !isnan2) || ( !isnan1 && isnan2 ) )
{
return FALSE;
- }
+ }
}
if (value == expected)
@@ -5946,13 +5946,13 @@ void print_char_pos( int *ph, /* print header */
parallel_print("[ " );
if ( rank > 0 )
{
-
+
for ( i = 0; i < rank; i++)
{
parallel_print(HSIZE_T_FORMAT, (unsigned long long)pos[i]);
parallel_print(" ");
}
-
+
}
else
{
@@ -5970,8 +5970,8 @@ void print_char_pos( int *ph, /* print header */
*/
static void h5diff_print_char(char ch)
{
-
- switch (ch)
+
+ switch (ch)
{
case '"':
parallel_print("\\\"");
@@ -5999,7 +5999,7 @@ static void h5diff_print_char(char ch)
parallel_print( "%c", ch);
else
parallel_print( "\\%03o", ch);
-
+
break;
}
}