mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 08:49:02 +00:00
Fix dll linking warnings for VS 2015/17 (#467)
-- #ifdef out duplicate definitions -- remove make_nan() dead code
This commit is contained in:
@@ -151,7 +151,7 @@ typedef long long int64_t;
|
|||||||
#define isinf( _x) ((_x) == INFINITY || (_x) == -INFINITY)
|
#define isinf( _x) ((_x) == INFINITY || (_x) == -INFINITY)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ! defined( __INTEL_COMPILER )
|
#if _MSC_VER < 1900 && ! defined( __INTEL_COMPILER )
|
||||||
|
|
||||||
double rint( double x);
|
double rint( double x);
|
||||||
float rintf( float x);
|
float rintf( float x);
|
||||||
@@ -224,10 +224,10 @@ long int lrintf (float flt);
|
|||||||
float int2float (int32_t ix);
|
float int2float (int32_t ix);
|
||||||
int32_t float2int (float fx);
|
int32_t float2int (float fx);
|
||||||
|
|
||||||
#endif
|
#endif // _MSC_VER < 1900 && ! defined( __INTEL_COMPILER )
|
||||||
|
|
||||||
#if ! defined( __INTEL_COMPILER ) || __INTEL_COMPILER < 1300
|
#if _MSC_VER < 1900 && ( ! defined( __INTEL_COMPILER ) || __INTEL_COMPILER < 1300 )
|
||||||
// These functions appeared in Intel C v13.
|
// These functions appeared in Intel C v13 and Visual Studio 2015
|
||||||
float nanf( const char* str);
|
float nanf( const char* str);
|
||||||
double nan( const char* str);
|
double nan( const char* str);
|
||||||
long double nanl( const char* str);
|
long double nanl( const char* str);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#if ! defined( __INTEL_COMPILER )
|
#if _MSC_VER < 1900 && ! defined( __INTEL_COMPILER )
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -276,6 +276,8 @@ int SIGNBIT_DP64(double x )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if _MSC_VER < 1900
|
||||||
|
|
||||||
/* fmax(x, y) returns the larger (more positive) of x and y.
|
/* fmax(x, y) returns the larger (more positive) of x and y.
|
||||||
NaNs are treated as missing values: if one argument is NaN,
|
NaNs are treated as missing values: if one argument is NaN,
|
||||||
the other argument is returned. If both arguments are NaN,
|
the other argument is returned. If both arguments are NaN,
|
||||||
@@ -560,6 +562,7 @@ long int lrintf (float x)
|
|||||||
return (long int) x;
|
return (long int) x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // _MSC_VER < 1900
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -589,20 +592,7 @@ int feclearexcept(int excepts)
|
|||||||
|
|
||||||
#endif // __INTEL_COMPILER
|
#endif // __INTEL_COMPILER
|
||||||
|
|
||||||
#if ! defined( __INTEL_COMPILER ) || __INTEL_COMPILER < 1300
|
#if _MSC_VER < 1900 && ( ! defined( __INTEL_COMPILER ) || __INTEL_COMPILER < 1300 )
|
||||||
|
|
||||||
float make_nan()
|
|
||||||
{
|
|
||||||
/* This is the IEEE 754 single-precision format:
|
|
||||||
unsigned int mantissa: 22;
|
|
||||||
unsigned int quiet_nan: 1;
|
|
||||||
unsigned int exponent: 8;
|
|
||||||
unsigned int negative: 1;
|
|
||||||
*/
|
|
||||||
//const static unsigned
|
|
||||||
static const int32_t _nan = 0x7fc00000;
|
|
||||||
return *(const float*)(&_nan);
|
|
||||||
}
|
|
||||||
|
|
||||||
float nanf( const char* str)
|
float nanf( const char* str)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user