aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-15 20:49:03 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-12-15 20:49:03 +0000
commit1ad751b991619a9b665b851356e3aa0f0f03be82 (patch)
treece16b890253015fe59bdfcb3218936034a52067f /Eigen/src
parent55b603e4573711ff33a293ed9706c33e92b834fc (diff)
only enable the "unaligned array" assert if vectorization is enabled.
if vectorization is disabled, WithAlignedOperatorNew is empty!
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/util/Memory.h5
1 files changed, 5 insertions, 0 deletions
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 <typename T, int Size, bool Align> 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<size_t>(array) & 0xf) == 0
&& "this assertion is explained here: http://eigen.tuxfamily.org/api/UnalignedArrayAssert.html **** READ THIS WEB PAGE !!! ****");
+ #endif
}
};