mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r15989] Merge with 1.8 up to rev 15945
Regarding use of unsigned long long print format Tested: linux
This commit is contained in:
parent
13294e2042
commit
840c6e34d3
@ -17,16 +17,12 @@
|
||||
#include "h5diff.h"
|
||||
#include "ph5diff.h"
|
||||
#include "H5private.h"
|
||||
#include "h5tools.h"
|
||||
|
||||
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
|
||||
#if 0
|
||||
#define H5DIFF_DO_TIME
|
||||
#endif
|
||||
#if 1
|
||||
#define H5DIFF_DO_NAN
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* printf formatting
|
||||
@ -247,7 +243,8 @@ void print_pos( int *ph, /* print header */
|
||||
parallel_print("[ " );
|
||||
for ( i = 0; i < rank; i++)
|
||||
{
|
||||
parallel_print("%"H5_PRINTF_LL_WIDTH"u ", (unsigned long_long)pos[i]);
|
||||
parallel_print(HSIZE_T_FORMAT, (unsigned long_long)pos[i]);
|
||||
parallel_print(" ");
|
||||
}
|
||||
parallel_print("]" );
|
||||
}
|
||||
@ -2999,20 +2996,7 @@ hsize_t diff_float(unsigned char *mem1,
|
||||
else
|
||||
{
|
||||
|
||||
#if defined (H5DIFF_DO_TIME)
|
||||
int time;
|
||||
|
||||
#if defined (WIN32)
|
||||
struct _timeb *tbstart = malloc(sizeof(struct _timeb));
|
||||
struct _timeb *tbstop = malloc(sizeof(struct _timeb));
|
||||
_ftime( tbstart);
|
||||
#else
|
||||
struct timeb *tbstart = malloc(sizeof(struct timeb));
|
||||
struct timeb *tbstop = malloc(sizeof(struct timeb));
|
||||
ftime( tbstart);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
for ( i = 0; i < nelmts; i++)
|
||||
{
|
||||
@ -3040,18 +3024,6 @@ hsize_t diff_float(unsigned char *mem1,
|
||||
|
||||
|
||||
|
||||
#if defined (H5DIFF_DO_TIME)
|
||||
|
||||
#if defined (WIN32)
|
||||
_ftime( tbstop );
|
||||
#else
|
||||
ftime( tbstop );
|
||||
#endif
|
||||
|
||||
time = tbstop->time - tbstart->time;
|
||||
printf(" TIME = %d sec\n", time );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
@ -5289,8 +5261,6 @@ hbool_t equal_double(double value, double expected)
|
||||
int both_zero;
|
||||
int is_zero;
|
||||
|
||||
#if defined (H5DIFF_DO_NAN)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* detect NaNs
|
||||
*-------------------------------------------------------------------------
|
||||
@ -5321,8 +5291,6 @@ hbool_t equal_double(double value, double expected)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
BOTH_ZERO(value,expected)
|
||||
if (both_zero)
|
||||
return TRUE;
|
||||
@ -5354,8 +5322,6 @@ hbool_t equal_ldouble(long double value, long double expected)
|
||||
int both_zero;
|
||||
int is_zero;
|
||||
|
||||
#if defined (H5DIFF_DO_NAN)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* detect NaNs
|
||||
*-------------------------------------------------------------------------
|
||||
@ -5386,8 +5352,6 @@ hbool_t equal_ldouble(long double value, long double expected)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
BOTH_ZERO(value,expected)
|
||||
if (both_zero)
|
||||
return TRUE;
|
||||
@ -5423,8 +5387,6 @@ hbool_t equal_float(float value, float expected)
|
||||
int both_zero;
|
||||
int is_zero;
|
||||
|
||||
#if defined (H5DIFF_DO_NAN)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* detect NaNs
|
||||
*-------------------------------------------------------------------------
|
||||
@ -5455,8 +5417,6 @@ hbool_t equal_float(float value, float expected)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
BOTH_ZERO(value,expected)
|
||||
if (both_zero)
|
||||
return TRUE;
|
||||
|
@ -18,32 +18,6 @@
|
||||
#include "H5private.h"
|
||||
#include "h5tools.h"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: print_size
|
||||
*
|
||||
* Purpose: print dimensions
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#if defined (H5DIFF_DEBUG)
|
||||
static void
|
||||
print_size (int rank, hsize_t *dims)
|
||||
{
|
||||
int i;
|
||||
|
||||
parallel_print("[" );
|
||||
for ( i = 0; i < rank-1; i++)
|
||||
{
|
||||
parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]);
|
||||
parallel_print("x");
|
||||
}
|
||||
parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]);
|
||||
parallel_print("]\n" );
|
||||
|
||||
}
|
||||
#endif /* H5DIFF_DEBUG */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: diff_dataset
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include "h5diff.h"
|
||||
#include "ph5diff.h"
|
||||
#include "H5private.h"
|
||||
#include "h5tools.h"
|
||||
|
||||
|
||||
/* global variables */
|
||||
int g_nTasks = 1;
|
||||
@ -100,15 +102,16 @@ void parallel_print(const char* format, ...)
|
||||
void
|
||||
print_dimensions (int rank, hsize_t *dims)
|
||||
{
|
||||
int i;
|
||||
|
||||
int i;
|
||||
|
||||
parallel_print("[" );
|
||||
for ( i = 0; i < rank-1; i++)
|
||||
{
|
||||
parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]);
|
||||
parallel_print(HSIZE_T_FORMAT, dims[i]);
|
||||
parallel_print("x");
|
||||
}
|
||||
parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]);
|
||||
|
||||
parallel_print(HSIZE_T_FORMAT, dims[rank-1]);
|
||||
parallel_print("]" );
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user