diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2010-12-16 20:08:22 +0100 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2010-12-16 20:08:22 +0100 |
commit | efdf2e405664163c685127aecec53a21977f8031 (patch) | |
tree | 9d11f7e70ddca46af4f061498688e37966ea13ff /Eigen | |
parent | b31e1246e18403ef60257aa7980b486b8be51110 (diff) |
Added automatic SSE3/4.1/4.2 support for MSVC.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Core | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Eigen/Core b/Eigen/Core index 4100c435a..d88cdc1a9 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -169,6 +169,22 @@ // required for __cpuid, needs to be included after cmath #if defined(_MSC_VER) && (defined(_M_IX86)||defined(_M_X64)) #include <intrin.h> + // When available, intrin.h pulls in all SSE headers which allows us + // to check which SSE level is supported on MSVC systems + #ifndef EIGEN_DONT_VECTORIZE + #ifdef _INCLUDED_PMM + #define EIGEN_VECTORIZE_SSE3 + #endif + #ifdef _INCLUDED_TMM + #define EIGEN_VECTORIZE_SSSE3 + #endif + #ifdef _INCLUDED_SMM + #define EIGEN_VECTORIZE_SSE4_1 + #endif + #ifdef _INCLUDED_NMM + #define EIGEN_VECTORIZE_SSE4_2 + #endif + #endif #endif #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS) |