aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-03 04:00:49 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-03 04:00:49 -0700
commitca0ba0d9a41683832ce0cd5e208b2696aab61e11 (patch)
tree7b2bc2137c7f843a40c166246de2d8f611e7e838
parentc80587c92b019de2bd31572aea95e5e6144f4207 (diff)
Improved AVX512 support
-rw-r--r--CMakeLists.txt3
-rw-r--r--Eigen/Core2
-rw-r--r--Eigen/src/Core/util/Macros.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f5cc7376..2a5ca42bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,7 +133,6 @@ if(NOT MSVC)
if(COMPILER_SUPPORT_WERROR)
set(CMAKE_REQUIRED_FLAGS "-Werror")
endif()
- ei_add_cxx_compiler_flag("-static")
ei_add_cxx_compiler_flag("-pedantic")
ei_add_cxx_compiler_flag("-Wall")
ei_add_cxx_compiler_flag("-Wextra")
@@ -233,7 +232,7 @@ if(NOT MSVC)
option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF)
if(EIGEN_TEST_AVX512)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -fabi-version=6")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -fabi-version=6" -DEIGEN_ENABLE_AVX512)
message(STATUS "Enabling AVX512 in tests/examples")
endif()
diff --git a/Eigen/Core b/Eigen/Core
index f5d1126cc..898a18751 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -157,7 +157,7 @@
#ifdef __FMA__
#define EIGEN_VECTORIZE_FMA
#endif
- #ifdef __AVX512F__
+ #ifdef __AVX512F__ && EIGEN_ENABLE_AVX512
#define EIGEN_VECTORIZE_AVX512
#define EIGEN_VECTORIZE_AVX2
#define EIGEN_VECTORIZE_AVX
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index cfdbca5dd..380b6bd0d 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -659,7 +659,7 @@ namespace Eigen {
// If the user explicitly disable vectorization, then we also disable alignment
#if defined(EIGEN_DONT_VECTORIZE)
#define EIGEN_IDEAL_MAX_ALIGN_BYTES 0
-#elif defined(__AVX512F__)
+#elif defined(EIGEN_VECTORIZE_AVX512)
// 64 bytes static alignmeent is preferred only if really required
#define EIGEN_IDEAL_MAX_ALIGN_BYTES 64
#elif defined(__AVX__)