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 09:05:15 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-06 09:05:15 -0500
commit2bd31d3fbccbb2ab325c2ce86da1b0a948ff0281 (patch)
treeeca8a227db4b2736eb5de2d4f0e30e94bd154dad /Eigen/src/Core/util/XprHelper.h
parent61a14539c71a962e0a0e9de4b1b43307c6f58855 (diff)
* include Macros.h much earlier: since it takes care of the alignment platform detection, it is needed before we do the vectorization stuff in Eigen/Core !!
* kill EIGEN_DONT_ALIGN_HEAP option (one should use EIGEN_DONT_ALIGN) * rename EIGEN_DONT_ALIGN_STACK to EIGEN_DONT_ALIGN_STATICALLY. hope it's a better name.
Diffstat (limited to 'Eigen/src/Core/util/XprHelper.h')
-rw-r--r--Eigen/src/Core/util/XprHelper.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h
index b4f72b62c..4259ebb92 100644
--- a/Eigen/src/Core/util/XprHelper.h
+++ b/Eigen/src/Core/util/XprHelper.h
@@ -88,21 +88,38 @@ class ei_compute_matrix_flags
enum {
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
is_dynamic_size_storage = MaxRows==Dynamic || MaxCols==Dynamic,
-#if EIGEN_ALIGN_STACK
+#if EIGEN_ALIGN_STATICALLY
is_fixed_size_aligned
= (!is_dynamic_size_storage) && (((MaxCols*MaxRows) % ei_packet_traits<Scalar>::size) == 0),
#else
is_fixed_size_aligned = 0,
#endif
-#if EIGEN_ALIGN_HEAP
+#if EIGEN_ALIGN
is_dynamic_size_aligned = is_dynamic_size_storage,
#else
is_dynamic_size_aligned = 0,
#endif
- aligned_bit = (((Options&DontAlign)==0)
- && (is_dynamic_size_aligned || is_fixed_size_aligned))
- ? AlignedBit : 0,
+ aligned_bit =
+ (
+ ((Options&DontAlign)==0)
+ && (
+#if EIGEN_ALIGN_STATICALLY
+ ((!is_dynamic_size_storage) && (((MaxCols*MaxRows) % ei_packet_traits<Scalar>::size) == 0))
+#else
+ 0
+#endif
+
+ ||
+
+#if EIGEN_ALIGN
+ is_dynamic_size_storage
+#else
+ 0
+#endif
+
+ )
+ ) ? AlignedBit : 0,
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
};