From b8861b0c25475d92f805a4481f3fb584c693a9a6 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 11 Dec 2015 09:19:57 -0800 Subject: [PATCH] Make sure the data is aligned on a 64 byte boundary when using avx512 instructions. --- Eigen/src/Core/util/Macros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index fcad3694e..34f87ca40 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -589,6 +589,9 @@ 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__) + // 64 bytes static alignmeent is preferred only if really required + #define EIGEN_IDEAL_MAX_ALIGN_BYTES 64 #elif defined(__AVX__) // 32 bytes static alignmeent is preferred only if really required #define EIGEN_IDEAL_MAX_ALIGN_BYTES 32