mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 17:33:15 +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,
|
HasNoInnerStride = InnerStrideAtCompileTime == 1,
|
||||||
HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,
|
HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,
|
||||||
HasNoStride = HasNoInnerStride && HasNoOuterStride,
|
HasNoStride = HasNoInnerStride && HasNoOuterStride,
|
||||||
IsAligned = int(int(MapOptions)&Aligned)==Aligned,
|
IsAligned = bool(EIGEN_ALIGN) && ((int(MapOptions)&Aligned)==Aligned),
|
||||||
IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic,
|
IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic,
|
||||||
KeepsPacketAccess = bool(HasNoInnerStride)
|
KeepsPacketAccess = bool(HasNoInnerStride)
|
||||||
&& ( bool(IsDynamicSize)
|
&& ( bool(IsDynamicSize)
|
||||||
|
@ -53,6 +53,11 @@ void dontalign(const MatrixType& m)
|
|||||||
v = square * v;
|
v = square * v;
|
||||||
v = a.adjoint() * v;
|
v = a.adjoint() * v;
|
||||||
VERIFY(square.determinant() != Scalar(0));
|
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()
|
void test_dontalign()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user