From 1ad751b991619a9b665b851356e3aa0f0f03be82 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 15 Dec 2008 20:49:03 +0000 Subject: only enable the "unaligned array" assert if vectorization is enabled. if vectorization is disabled, WithAlignedOperatorNew is empty! --- Eigen/src/Core/util/Memory.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Eigen/src') diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 7dbc8dbd3..209e273cd 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -42,8 +42,13 @@ template struct ei_aligned_array ei_aligned_array() { + #ifdef EIGEN_VECTORIZE // we only want this assertion if EIGEN_VECTORIZE is defined. + // indeed, if it's not defined then WithAlignedOperatorNew is empty and hence there's not much point + // requiring the user to inherit it! Would be best practice, but we already decided at several places + // to only do special alignment if vectorization is enabled. ei_assert((reinterpret_cast(array) & 0xf) == 0 && "this assertion is explained here: http://eigen.tuxfamily.org/api/UnalignedArrayAssert.html **** READ THIS WEB PAGE !!! ****"); + #endif } }; -- cgit v1.2.3