* introduce ei_alignmentOffset(MatrixBase&,Integer)

couldnt put it in Memory.h as it needs the definition of MatrixBase
* make Redux use it
This commit is contained in:
Benoit Jacob
2009-12-16 08:53:14 -05:00
parent e0aa29121f
commit 5cb779e5e1
3 changed files with 38 additions and 5 deletions

View File

@@ -209,10 +209,7 @@ struct ei_redux_impl<Func, Derived, LinearVectorizedTraversal, NoUnrolling>
{
const int size = mat.size();
const int packetSize = ei_packet_traits<Scalar>::size;
const int alignedStart = (Derived::Flags & AlignedBit)
|| !(Derived::Flags & DirectAccessBit)
? 0
: ei_alignmentOffset(&mat.const_cast_derived().coeffRef(0), size);
const int alignedStart = ei_alignmentOffset(mat,size);
enum {
alignment = (Derived::Flags & DirectAccessBit) || (Derived::Flags & AlignedBit)
? Aligned : Unaligned