aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/Core12
1 files changed, 11 insertions, 1 deletions
diff --git a/Eigen/Core b/Eigen/Core
index 3d325c716..8189304d6 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -13,7 +13,17 @@
#ifndef EIGEN_DONT_VECTORIZE
#define EIGEN_HAVE__SSE2__BUT_NOT_OLD_GCC ((defined __SSE2__) && ( (!defined __GNUC__) || EIGEN_GNUC_AT_LEAST(4,2) ))
- #define EIGEN_HAVE_MSVC_SSE2 ((defined(_M_IX86_FP)) && (_M_IX86_FP >= 2)) // the parentheses around defined are really needed by MSVC
+
+ // Now check for SSE2 with MSVC. Normally we'd formulate this in 1 line using defined() but this triggers MSVC bugs.
+ #ifdef _M_IX86_FP
+ #if (_M_IX86_FP >= 2)
+ #define EIGEN_HAVE_MSVC_SSE2 1
+ #endif
+ #endif
+ #ifndef EIGEN_HAVE_MSVC_SSE2
+ #define EIGEN_HAVE_MSVC_SSE2 0
+ #endif
+
#if (EIGEN_HAVE__SSE2__BUT_NOT_OLD_GCC || EIGEN_HAVE_MSVC_SSE2)
#define EIGEN_VECTORIZE
#define EIGEN_VECTORIZE_SSE