mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
issue #2581: review and cleanup of compiler version checks
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
b523120687
commit
d70b4864d9
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user