mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
bug #1343: fix compilation regression in array = matrix_product
This commit is contained in:
parent
a6a3fd0703
commit
cebff7e3a2
@ -264,7 +264,7 @@ template<> struct gemv_dense_selector<OnTheRight,ColMajor,true>
|
|||||||
if (!evalToDest)
|
if (!evalToDest)
|
||||||
{
|
{
|
||||||
if(!alphaIsCompatible)
|
if(!alphaIsCompatible)
|
||||||
dest += actualAlpha * MappedDest(actualDestPtr, dest.size());
|
dest.matrix() += actualAlpha * MappedDest(actualDestPtr, dest.size());
|
||||||
else
|
else
|
||||||
dest = MappedDest(actualDestPtr, dest.size());
|
dest = MappedDest(actualDestPtr, dest.size());
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,16 @@ template<typename MatrixType> void product_extra(const MatrixType& m)
|
|||||||
// regression test
|
// regression test
|
||||||
MatrixType tmp = m1 * m1.adjoint() * s1;
|
MatrixType tmp = m1 * m1.adjoint() * s1;
|
||||||
VERIFY_IS_APPROX(tmp, m1 * m1.adjoint() * s1);
|
VERIFY_IS_APPROX(tmp, m1 * m1.adjoint() * s1);
|
||||||
|
|
||||||
|
// regression test for bug 1343, assignment to arrays
|
||||||
|
Array<Scalar,Dynamic,1> a1 = m1 * vc2;
|
||||||
|
VERIFY_IS_APPROX(a1.matrix(),m1*vc2);
|
||||||
|
Array<Scalar,Dynamic,1> a2 = s1 * (m1 * vc2);
|
||||||
|
VERIFY_IS_APPROX(a2.matrix(),s1*m1*vc2);
|
||||||
|
Array<Scalar,1,Dynamic> a3 = v1 * m1;
|
||||||
|
VERIFY_IS_APPROX(a3.matrix(),v1*m1);
|
||||||
|
Array<Scalar,Dynamic,Dynamic> a4 = m1 * m2.adjoint();
|
||||||
|
VERIFY_IS_APPROX(a4.matrix(),m1*m2.adjoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for bug reported at http://forum.kde.org/viewtopic.php?f=74&t=96947
|
// Regression test for bug reported at http://forum.kde.org/viewtopic.php?f=74&t=96947
|
||||||
|
Loading…
x
Reference in New Issue
Block a user