Make sure the data is aligned on a 64 byte boundary when using avx512 instructions.

This commit is contained in:
Benoit Steiner 2015-12-11 09:19:57 -08:00
parent 9a415fb1e2
commit b8861b0c25

View File

@ -589,6 +589,9 @@ namespace Eigen {
// If the user explicitly disable vectorization, then we also disable alignment // If the user explicitly disable vectorization, then we also disable alignment
#if defined(EIGEN_DONT_VECTORIZE) #if defined(EIGEN_DONT_VECTORIZE)
#define EIGEN_IDEAL_MAX_ALIGN_BYTES 0 #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__) #elif defined(__AVX__)
// 32 bytes static alignmeent is preferred only if really required // 32 bytes static alignmeent is preferred only if really required
#define EIGEN_IDEAL_MAX_ALIGN_BYTES 32 #define EIGEN_IDEAL_MAX_ALIGN_BYTES 32