mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-11-21 03:11:25 +08:00
fix bug #219: Map Flags AlignedBit was miscomputed, didn't account for EIGEN_ALIGN
This commit is contained in:
parent
9a47fb289b
commit
dc36efbb8f
@ -95,7 +95,7 @@ struct traits<Map<PlainObjectType, MapOptions, StrideType> >
|
||||
HasNoInnerStride = InnerStrideAtCompileTime == 1,
|
||||
HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,
|
||||
HasNoStride = HasNoInnerStride && HasNoOuterStride,
|
||||
IsAligned = int(int(MapOptions)&Aligned)==Aligned,
|
||||
IsAligned = bool(EIGEN_ALIGN) && ((int(MapOptions)&Aligned)==Aligned),
|
||||
IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic,
|
||||
KeepsPacketAccess = bool(HasNoInnerStride)
|
||||
&& ( bool(IsDynamicSize)
|
||||
|
@ -53,6 +53,11 @@ void dontalign(const MatrixType& m)
|
||||
v = square * v;
|
||||
v = a.adjoint() * v;
|
||||
VERIFY(square.determinant() != Scalar(0));
|
||||
|
||||
// bug 219: MapAligned() was giving an assert with EIGEN_DONT_ALIGN, because Map Flags were miscomputed
|
||||
Scalar* array = internal::aligned_new<Scalar>(rows);
|
||||
v = VectorType::MapAligned(array, rows);
|
||||
internal::aligned_delete(array, rows);
|
||||
}
|
||||
|
||||
void test_dontalign()
|
||||
|
Loading…
Reference in New Issue
Block a user