diff options
author | 2012-09-27 23:35:54 +0200 | |
---|---|---|
committer | 2012-09-27 23:35:54 +0200 | |
commit | 87074d97e5a0f709f45dcb17493d2151295b6ce2 (patch) | |
tree | 5a7a5ceafbe07dac6b6789be08c0ec9145b4a7ce /Eigen | |
parent | 82c3ff378423227a026ca710416c5f9cef1229d6 (diff) |
old gcc versions do not have immintrin.h file...
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Core | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Eigen/Core b/Eigen/Core index 366465888..502a4fc55 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -87,7 +87,26 @@ // so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern "C" here too. // notice that since these are C headers, the extern "C" is theoretically needed anyways. extern "C" { - #include <immintrin.h> + // In theory we should only include immintrin.h and not the other *mmintrin.h header files directly. + // Doing so triggers some issues with ICC. However old gcc versions seems to not have this file, thus: + #ifdef __INTEL_COMPILER + #include <immintrin.h> + #else + #include <emmintrin.h> + #include <xmmintrin.h> + #ifdef EIGEN_VECTORIZE_SSE3 + #include <pmmintrin.h> + #endif + #ifdef EIGEN_VECTORIZE_SSSE3 + #include <tmmintrin.h> + #endif + #ifdef EIGEN_VECTORIZE_SSE4_1 + #include <smmintrin.h> + #endif + #ifdef EIGEN_VECTORIZE_SSE4_2 + #include <nmmintrin.h> + #endif + #endif } // end extern "C" #elif defined __ALTIVEC__ #define EIGEN_VECTORIZE |