aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Macros.h
diff options
context:
space:
mode:
authorGravatar Mark D Ryan <mark.d.ryan@intel.com>2018-05-17 17:04:00 +0100
committerGravatar Mark D Ryan <mark.d.ryan@intel.com>2018-05-17 17:04:00 +0100
commit405859f18dac56f324e1d93ca8721d5f7fd22c62 (patch)
tree0fcfabe307e9918e417ebc33d6d3425b47c7651d /Eigen/src/Core/util/Macros.h
parent6293ad3f392a7b97ebb9f9f874682505c1391f2d (diff)
Set EIGEN_IDEAL_MAX_ALIGN_BYTES correctly for AVX512 builds
bug #1548 The macro EIGEN_IDEAL_MAX_ALIGN_BYTES is being incorrectly set to 32 on AVX512 builds. It should be set to 64. In the current code it is only set to 64 if the macro EIGEN_VECTORIZE_AVX512 is defined. This macro does get defined in AVX512 builds in Core, but only after Macros.h, the file that defines EIGEN_IDEAL_MAX_ALIGN_BYTES, has been included. This commit fixes the issue by setting EIGEN_IDEAL_MAX_ALIGN_BYTES to 64 if __AVX512F__ is defined.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r--Eigen/src/Core/util/Macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 9c68ecb7d..729fb3b1d 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -702,7 +702,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(EIGEN_VECTORIZE_AVX512)
+#elif defined(__AVX512F__)
// 64 bytes static alignment is preferred only if really required
#define EIGEN_IDEAL_MAX_ALIGN_BYTES 64
#elif defined(__AVX__)