Added automatic SSE3/4.1/4.2 support for MSVC.

This commit is contained in:
Hauke Heibel 2010-12-16 20:08:22 +01:00
parent b31e1246e1
commit efdf2e4056

View File

@ -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)