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

@@ -714,6 +714,11 @@ int32_t float2int(float fx)
return u.i;
}
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif
#if !__has_builtin(__builtin_clz)
#if !defined(_WIN64)
/** Returns the number of leading 0-bits in x,
starting at the most significant bit position.
@@ -778,6 +783,7 @@ int __builtin_clz(unsigned int pattern)
}
#endif // !defined(_WIN64)
#endif // !__has_builtin(__builtin_clz)
#include <intrin.h>
#include <emmintrin.h>