Enable building OpenCL-CTS with Intel DPC++/C++ compiler ICX on Windows (#2088)

Currently Intel® C++ Compiler Classic (ICC) is supported to build
OpenCL-CTS on Windows. This compiler has been discontinued since the
second half of 2023. Instead, Intel recommends that users transition to
use the LLVM-based Intel® oneAPI DPC++/C++ Compiler (ICX).
This change is to enable users to build OpenCL-CTS with ICX on Windows.
This commit is contained in:
Qichao Gu
2024-11-06 00:52:16 +08:00
committed by GitHub
parent 6563c9062c
commit ccd455040a
14 changed files with 63 additions and 61 deletions

View File

@@ -3196,7 +3196,7 @@ int reference_isgreaterequall(long double x, long double y) { return x >= y; }
int reference_isinfl(long double x) { return 0 != isinf(x); }
int reference_islessl(long double x, long double y) { return x < y; }
int reference_islessequall(long double x, long double y) { return x <= y; }
#if defined(__INTEL_COMPILER)
#if defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
int reference_islessgreaterl(long double x, long double y)
{
return 0 != islessgreaterl(x, y);
@@ -3218,7 +3218,7 @@ int reference_isunorderedl(long double x, long double y)
{
return isnan(x) || isnan(y);
}
#if defined(__INTEL_COMPILER)
#if defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
int reference_signbitl(long double x) { return 0 != signbitl(x); }
#else
int reference_signbitl(long double x) { return 0 != signbit(x); }
@@ -3582,7 +3582,8 @@ long double reference_exp2l(long double z)
long double reference_expm1l(long double x)
{
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) \
&& !defined(__INTEL_LLVM_COMPILER)
// unimplemented
return x;
#else
@@ -3667,7 +3668,8 @@ long double reference_log2l(long double x)
long double reference_log1pl(long double x)
{
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) \
&& !defined(__INTEL_LLVM_COMPILER)
// unimplemented
return x;
#elif defined(__PPC__)

View File

@@ -215,7 +215,8 @@ inline void Force64BitFPUPrecision(void)
__asm__ __volatile__("fstcw %0" : "=m"(orig_cw));
new_cw = orig_cw | 0x0300; // set precision to 64-bit
__asm__ __volatile__("fldcw %0" ::"m"(new_cw));
#elif defined(_WIN32) && defined(__INTEL_COMPILER)
#elif defined(_WIN32) \
&& (defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER))
// Unfortunately, usual method (`_controlfp( _PC_64, _MCW_PC );') does *not*
// work on win.x64: > On the x64 architecture, changing the floating point
// precision is not supported. (Taken from