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

@@ -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