diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-12-07 09:23:28 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-12-07 09:23:28 +0100 |
commit | ae59a7652bae0727a983d586395bcaf2c48385cc (patch) | |
tree | d04b5dedb3a2f10330da74ad5a18dbf9a1567f76 /Eigen/src/Core/util/ConfigureVectorization.h | |
parent | 4e7746fe2234ccaa10cb0c9431d68ee72a1d1d40 (diff) |
bug #1638: add a warning if avx512 is enabled without SSE/AVX FMA
Diffstat (limited to 'Eigen/src/Core/util/ConfigureVectorization.h')
-rw-r--r-- | Eigen/src/Core/util/ConfigureVectorization.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/ConfigureVectorization.h b/Eigen/src/Core/util/ConfigureVectorization.h index 2ba0bab98..2584717b5 100644 --- a/Eigen/src/Core/util/ConfigureVectorization.h +++ b/Eigen/src/Core/util/ConfigureVectorization.h @@ -254,6 +254,13 @@ #define EIGEN_VECTORIZE_FMA #endif #if defined(__AVX512F__) + #ifndef __FMA__ + #if EIGEN_COMP_GNUC + #warning Please add -mfma to your compiler flags: compiling with -mavx512f alone without SSE/AVX FMA is not supported (bug 1638). + #else + #error Please enable FMA in your compiler flags (e.g. -mfma): compiling with AVX512 alone without SSE/AVX FMA is not supported (bug 1638). + #endif + #endif #define EIGEN_VECTORIZE_AVX512 #define EIGEN_VECTORIZE_AVX2 #define EIGEN_VECTORIZE_AVX |