Added support for AVX512 to the build files

This commit is contained in:
Benoit Steiner 2016-01-05 10:02:49 -08:00
parent 9f9d8d2f62
commit 99093c0fe0
2 changed files with 12 additions and 0 deletions

View File

@ -221,6 +221,12 @@ if(NOT MSVC)
message(STATUS "Enabling FMA in tests/examples") message(STATUS "Enabling FMA in tests/examples")
endif() endif()
option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF)
if(EIGEN_TEST_AVX512)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f")
message(STATUS "Enabling AVX512 in tests/examples")
endif()
option(EIGEN_TEST_ALTIVEC "Enable/Disable AltiVec in tests/examples" OFF) option(EIGEN_TEST_ALTIVEC "Enable/Disable AltiVec in tests/examples" OFF)
if(EIGEN_TEST_ALTIVEC) if(EIGEN_TEST_ALTIVEC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec")

View File

@ -276,6 +276,12 @@ macro(ei_testing_print_summary)
message(STATUS "FMA: Using architecture defaults") message(STATUS "FMA: Using architecture defaults")
endif() endif()
if(EIGEN_TEST_AVX512)
message(STATUS "AVX512: ON")
else()
message(STATUS "AVX512: Using architecture defaults")
endif()
if(EIGEN_TEST_ALTIVEC) if(EIGEN_TEST_ALTIVEC)
message(STATUS "Altivec: ON") message(STATUS "Altivec: ON")
else() else()