From 3c3820dbcbde6320c6f9522d9eae0fe2b8a74d2c Mon Sep 17 00:00:00 2001 From: Grzegorz Wawiorko <35483345+gwawiork@users.noreply.github.com> Date: Tue, 11 Jun 2019 10:24:27 +0200 Subject: [PATCH] Intel compiler changes compat.h (#285) --- test_common/harness/compat.h | 49 ++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/test_common/harness/compat.h b/test_common/harness/compat.h index 23445c8e..dc8468ff 100644 --- a/test_common/harness/compat.h +++ b/test_common/harness/compat.h @@ -123,30 +123,35 @@ typedef long long int64_t; extern "C" { #endif -#ifndef M_PI - #define M_PI 3.14159265358979323846264338327950288 -#endif + #ifndef M_PI + #define M_PI 3.14159265358979323846264338327950288 + #endif - #if ! defined( __INTEL_COMPILER ) + #ifndef NAN + #define NAN (INFINITY - INFINITY) + #endif - #ifndef NAN - #define NAN (INFINITY - INFINITY) - #endif - #ifndef HUGE_VALF - #define HUGE_VALF (float)HUGE_VAL - #endif - #ifndef INFINITY - #define INFINITY (FLT_MAX + FLT_MAX) - #endif - #ifndef isfinite - #define isfinite(x) _finite(x) - #endif - #ifndef isnan -#define isnan( x ) ((x) != (x)) - #endif - #ifndef isinf -#define isinf( _x) ((_x) == INFINITY || (_x) == -INFINITY) - #endif + #ifndef HUGE_VALF + #define HUGE_VALF (float)HUGE_VAL + #endif + + #ifndef INFINITY + #define INFINITY (FLT_MAX + FLT_MAX) + #endif + + #ifndef isfinite + #define isfinite(x) _finite(x) + #endif + + #ifndef isnan + #define isnan( x ) ((x) != (x)) + #endif + + #ifndef isinf + #define isinf( _x) ((_x) == INFINITY || (_x) == -INFINITY) + #endif + +#if ! defined( __INTEL_COMPILER ) double rint( double x); float rintf( float x);