aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/XprHelper.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-06 02:17:37 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-06 02:17:37 -0500
commitf03d95348d6b1b283b772ceb9988f5cb230e63ea (patch)
treeb4a3d7c02fe34cf4ef0ea6ae92775e79dead44c0 /Eigen/src/Core/util/XprHelper.h
parentafd7ee759b4b332391f3c1a865f46eed0d3e32ea (diff)
introduce EIGEN_DONT_ALIGN_STACK (disables alignment attributes) and EIGEN_DONT_ALIGN_HEAP (disables aligned malloc)...
you can still use EIGEN_DONT_ALIGN to do both at once.
Diffstat (limited to 'Eigen/src/Core/util/XprHelper.h')
-rw-r--r--Eigen/src/Core/util/XprHelper.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h
index eff055b04..b4f72b62c 100644
--- a/Eigen/src/Core/util/XprHelper.h
+++ b/Eigen/src/Core/util/XprHelper.h
@@ -88,15 +88,20 @@ class ei_compute_matrix_flags
enum {
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
is_dynamic_size_storage = MaxRows==Dynamic || MaxCols==Dynamic,
-#if !defined(__ARM_NEON__)
+#if EIGEN_ALIGN_STACK
is_fixed_size_aligned
= (!is_dynamic_size_storage) && (((MaxCols*MaxRows) % ei_packet_traits<Scalar>::size) == 0),
#else
-// FIXME!!! This is a hack because ARM gcc does not honour __attribute__((aligned(16))) properly
is_fixed_size_aligned = 0,
#endif
+#if EIGEN_ALIGN_HEAP
+ is_dynamic_size_aligned = is_dynamic_size_storage,
+#else
+ is_dynamic_size_aligned = 0,
+#endif
+
aligned_bit = (((Options&DontAlign)==0)
- && (is_dynamic_size_storage || is_fixed_size_aligned))
+ && (is_dynamic_size_aligned || is_fixed_size_aligned))
? AlignedBit : 0,
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
};