issue #2581: review and cleanup of compiler version checks

This commit is contained in:
Sean McBride
2023-01-17 18:58:34 +00:00
committed by Rasmus Munk Larsen
parent b523120687
commit d70b4864d9
25 changed files with 103 additions and 72 deletions

View File

@@ -13,7 +13,7 @@
// for packet_traits<Packet*>
// => The only workaround would be to wrap _m128 and the likes
// within wrappers.
#if EIGEN_GNUC_AT_LEAST(6,0)
#if EIGEN_GNUC_STRICT_AT_LEAST(6,0,0)
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif

View File

@@ -139,7 +139,7 @@ struct complex_operators {
out[out_idx++] = a / numext::real(b);
out[out_idx++] = numext::real(a) / b;
#if !defined(EIGEN_COMP_MSVC)
#if !EIGEN_COMP_MSVC
out[out_idx] = a; out[out_idx++] += b;
out[out_idx] = a; out[out_idx++] -= b;
out[out_idx] = a; out[out_idx++] *= b;
@@ -191,7 +191,7 @@ struct complex_operators {
res.segment(block_idx, size) = x1.real().array() / x2.array();
block_idx += size;
#if !defined(EIGEN_COMP_MSVC)
#if !EIGEN_COMP_MSVC
res.segment(block_idx, size) = x1; res.segment(block_idx, size) += x2;
block_idx += size;
res.segment(block_idx, size) = x1; res.segment(block_idx, size) -= x2;

View File

@@ -146,7 +146,7 @@ void ei_test_init_gpu()
std::cout << " EIGEN_CUDA_SDK_VER: " << int(EIGEN_CUDA_SDK_VER) << "\n";
#endif
#ifdef EIGEN_COMP_NVCC
#if EIGEN_COMP_NVCC
std::cout << " EIGEN_COMP_NVCC: " << int(EIGEN_COMP_NVCC) << "\n";
#endif

View File

@@ -395,7 +395,7 @@ void print_gpu_device_info()
std::cout << " EIGEN_CUDA_SDK_VER: " << int(EIGEN_CUDA_SDK_VER) << std::endl;
#endif
#ifdef EIGEN_COMP_NVCC
#if EIGEN_COMP_NVCC
std::cout << " EIGEN_COMP_NVCC: " << int(EIGEN_COMP_NVCC) << std::endl;
#endif

View File

@@ -86,9 +86,9 @@ EIGEN_DECLARE_TEST(meta)
VERIFY(( check_is_convertible(A*B, A) ));
}
#if (EIGEN_COMP_GNUC && EIGEN_COMP_GNUC <= 99) \
|| (EIGEN_COMP_CLANG && EIGEN_COMP_CLANG <= 909) \
|| (EIGEN_COMP_MSVC && EIGEN_COMP_MSVC <=1914)
#if (EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC <= 990) \
|| (EIGEN_COMP_CLANG_STRICT && EIGEN_COMP_CLANG <= 990) \
|| (EIGEN_COMP_MSVC && EIGEN_COMP_MSVC <= 1914)
// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1752,
// basically, a fix in the c++ standard breaks our c++98 implementation
// of is_convertible for abstract classes.

View File

@@ -26,7 +26,7 @@
// for packet_traits<Packet*>
// => The only workaround would be to wrap _m128 and the likes
// within wrappers.
#if EIGEN_GNUC_AT_LEAST(6,0)
#if EIGEN_GNUC_STRICT_AT_LEAST(6,0,0)
#pragma GCC diagnostic ignored "-Wignored-attributes"
#endif