mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Add support for Cray, Fujitsu, and Intel ICX compilers
The following preprocessor macros are added: - EIGEN_COMP_CPE and EIGEN_COMP_CLANGCPE version number of the CRAY compiler if Eigen is compiled with the Cray C++ compiler, 0 otherwise. - EIGEN_COMP_FCC and EIGEN_COMP_CLANGFCC version number of the FCC compiler if Eigen is compiled with the Fujitsu C++ compiler, 0 otherwise - EIGEN_COMP_CLANGICC version number of the ICX compiler if Eigen is compiled with the Intel oneAPI C++ compiler, 0 otherwise All three compilers (Cray, Fujitsu, Intel) offer a traditional and a Clang-based frontend. This is distinguished by the CLANG prefix.
This commit is contained in:
parent
96dc37a03b
commit
c4b1dd2f6b
@ -376,7 +376,7 @@ template<> EIGEN_STRONG_INLINE Packet2cf psqrt<Packet2cf>(const Packet2cf& a) {
|
||||
#if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG
|
||||
|
||||
// See bug 1325, clang fails to call vld1q_u64.
|
||||
#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
|
||||
#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML || EIGEN_COMP_CPE
|
||||
static uint64x2_t p2ul_CONJ_XOR = {0x0, 0x8000000000000000};
|
||||
#else
|
||||
const uint64_t p2ul_conj_XOR_DATA[] = { 0x0, 0x8000000000000000 };
|
||||
|
@ -54,7 +54,7 @@
|
||||
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||
#endif
|
||||
|
||||
#elif defined __GNUC__
|
||||
#elif defined __GNUC__ && !defined(__FUJITSU)
|
||||
|
||||
#if (!defined(EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#pragma GCC diagnostic push
|
||||
|
@ -87,13 +87,20 @@
|
||||
#define EIGEN_COMP_LLVM 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel compiler, 0 otherwise
|
||||
/// \internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel icc compiler, 0 otherwise
|
||||
#if defined(__INTEL_COMPILER)
|
||||
#define EIGEN_COMP_ICC __INTEL_COMPILER
|
||||
#else
|
||||
#define EIGEN_COMP_ICC 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_CLANGICC set to __INTEL_CLANG_COMPILER if the compiler is Intel icx compiler, 0 otherwise
|
||||
#if defined(__INTEL_CLANG_COMPILER)
|
||||
#define EIGEN_COMP_CLANGICC __INTEL_CLANG_COMPILER
|
||||
#else
|
||||
#define EIGEN_COMP_CLANGICC 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_MINGW set to 1 if the compiler is mingw
|
||||
#if defined(__MINGW32__)
|
||||
#define EIGEN_COMP_MINGW 1
|
||||
@ -193,9 +200,45 @@
|
||||
#define EIGEN_COMP_EMSCRIPTEN 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_FCC set to FCC version if the compiler is Fujitsu Compiler (traditional mode)
|
||||
/// \note The Fujitsu C/C++ compiler uses the traditional mode based
|
||||
/// on EDG g++ 6.1 by default or if envoked with the -Nnoclang flag
|
||||
#if defined(__FUJITSU)
|
||||
#define EIGEN_COMP_FCC (__FCC_major__*100+__FCC_minor__*10+__FCC_patchlevel__)
|
||||
#else
|
||||
#define EIGEN_COMP_FCC 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_CLANGFCC set to FCC version if the compiler is Fujitsu Compiler (Clang mode)
|
||||
/// \note The Fujitsu C/C++ compiler uses the non-traditional mode
|
||||
/// based on Clang 7.1.0 if envoked with the -Nclang flag
|
||||
#if defined(__CLANG_FUJITSU)
|
||||
#define EIGEN_COMP_CLANGFCC (__FCC_major__*100+__FCC_minor__*10+__FCC_patchlevel__)
|
||||
#else
|
||||
#define EIGEN_COMP_CLANGFCC 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_CPE set to CPE version if the compiler is HPE Cray Compiler (GCC based)
|
||||
/// \note This is the SVE-enabled C/C++ compiler from the HPE Cray
|
||||
/// Programming Environment (CPE) based on Cray GCC 8.1
|
||||
#if defined(_CRAYC) && !defined(__clang__)
|
||||
#define EIGEN_COMP_CPE (_RELEASE_MAJOR*100+_RELEASE_MINOR*10+_RELEASE_PATCHLEVEL)
|
||||
#else
|
||||
#define EIGEN_COMP_CPE 0
|
||||
#endif
|
||||
|
||||
/// \internal EIGEN_COMP_CLANGCPE set to CPE version if the compiler is HPE Cray Compiler (Clang based)
|
||||
/// \note This is the C/C++ compiler from the HPE Cray Programming
|
||||
/// Environment (CPE) based on Cray Clang 11.0 without SVE-support
|
||||
#if defined(_CRAYC) && defined(__clang__)
|
||||
#define EIGEN_COMP_CLANGCPE (_RELEASE_MAJOR*100+_RELEASE_MINOR*10+_RELEASE_PATCHLEVEL)
|
||||
#else
|
||||
#define EIGEN_COMP_CLANGCPE 0
|
||||
#endif
|
||||
|
||||
|
||||
/// \internal EIGEN_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC, clang, mingw, etc.)
|
||||
#if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN)
|
||||
#if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_CLANGICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN || EIGEN_COMP_FCC || EIGEN_COMP_CLANGFCC || EIGEN_COMP_CPE || EIGEN_COMP_CLANGCPE)
|
||||
#define EIGEN_COMP_GNUC_STRICT 1
|
||||
#else
|
||||
#define EIGEN_COMP_GNUC_STRICT 0
|
||||
|
@ -12,7 +12,7 @@
|
||||
#pragma warning pop
|
||||
#elif defined __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#elif defined __GNUC__ && !defined(__FUJITSU) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user