Intel compiler changes compat.h (#285)

This commit is contained in:
Grzegorz Wawiorko
2019-06-11 10:24:27 +02:00
committed by Kévin Petit
parent bc0000ba10
commit 3c3820dbcb

View File

@@ -123,31 +123,36 @@ typedef long long int64_t;
extern "C" { extern "C" {
#endif #endif
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288 #define M_PI 3.14159265358979323846264338327950288
#endif #endif
#if ! defined( __INTEL_COMPILER )
#ifndef NAN #ifndef NAN
#define NAN (INFINITY - INFINITY) #define NAN (INFINITY - INFINITY)
#endif #endif
#ifndef HUGE_VALF #ifndef HUGE_VALF
#define HUGE_VALF (float)HUGE_VAL #define HUGE_VALF (float)HUGE_VAL
#endif #endif
#ifndef INFINITY #ifndef INFINITY
#define INFINITY (FLT_MAX + FLT_MAX) #define INFINITY (FLT_MAX + FLT_MAX)
#endif #endif
#ifndef isfinite #ifndef isfinite
#define isfinite(x) _finite(x) #define isfinite(x) _finite(x)
#endif #endif
#ifndef isnan #ifndef isnan
#define isnan( x ) ((x) != (x)) #define isnan( x ) ((x) != (x))
#endif #endif
#ifndef isinf #ifndef isinf
#define isinf( _x) ((_x) == INFINITY || (_x) == -INFINITY) #define isinf( _x) ((_x) == INFINITY || (_x) == -INFINITY)
#endif #endif
#if ! defined( __INTEL_COMPILER )
double rint( double x); double rint( double x);
float rintf( float x); float rintf( float x);
long double rintl( long double x); long double rintl( long double x);