Improved AVX512 configuration

This commit is contained in:
Benoit Steiner 2016-11-03 04:50:28 -07:00
parent fbe672d599
commit 5c3995769c
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ if(NOT MSVC)
option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF) option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF)
if(EIGEN_TEST_AVX512) if(EIGEN_TEST_AVX512)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -fabi-version=6" -DEIGEN_ENABLE_AVX512) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -fabi-version=6 -DEIGEN_ENABLE_AVX512")
message(STATUS "Enabling AVX512 in tests/examples") message(STATUS "Enabling AVX512 in tests/examples")
endif() endif()

View File

@ -157,7 +157,7 @@
#ifdef __FMA__ #ifdef __FMA__
#define EIGEN_VECTORIZE_FMA #define EIGEN_VECTORIZE_FMA
#endif #endif
#ifdef __AVX512F__ && EIGEN_ENABLE_AVX512 #if defined(__AVX512F__) && defined(EIGEN_ENABLE_AVX512)
#define EIGEN_VECTORIZE_AVX512 #define EIGEN_VECTORIZE_AVX512
#define EIGEN_VECTORIZE_AVX2 #define EIGEN_VECTORIZE_AVX2
#define EIGEN_VECTORIZE_AVX #define EIGEN_VECTORIZE_AVX