mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-20 00:29:38 +08:00
bug #1310: workaround a compilation regression from 3.2 regarding triangular * homogeneous
This commit is contained in:
parent
67b4f45836
commit
8b84801f7f
@ -402,6 +402,18 @@ struct generic_product_impl<Lhs, Homogeneous<RhsArg,Vertical>, DenseShape, Homog
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO: the following specialization is to address a regression from 3.2 to 3.3
|
||||||
|
// In the future, this path should be optimized.
|
||||||
|
template<typename Lhs, typename RhsArg, int ProductTag>
|
||||||
|
struct generic_product_impl<Lhs, Homogeneous<RhsArg,Vertical>, TriangularShape, HomogeneousShape, ProductTag>
|
||||||
|
{
|
||||||
|
template<typename Dest>
|
||||||
|
static void evalTo(Dest& dst, const Lhs& lhs, const Homogeneous<RhsArg,Vertical>& rhs)
|
||||||
|
{
|
||||||
|
dst.noalias() = lhs * rhs.eval();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template<typename Lhs,typename Rhs>
|
template<typename Lhs,typename Rhs>
|
||||||
struct homogeneous_left_product_refactoring_helper
|
struct homogeneous_left_product_refactoring_helper
|
||||||
{
|
{
|
||||||
|
@ -111,6 +111,8 @@ template<typename Scalar,int Size> void homogeneous(void)
|
|||||||
|
|
||||||
VERIFY_IS_APPROX( (v0.transpose().homogeneous() .lazyProduct( t2 )).hnormalized(), (v0.transpose().homogeneous()*t2).hnormalized() );
|
VERIFY_IS_APPROX( (v0.transpose().homogeneous() .lazyProduct( t2 )).hnormalized(), (v0.transpose().homogeneous()*t2).hnormalized() );
|
||||||
VERIFY_IS_APPROX( (pts.transpose().rowwise().homogeneous() .lazyProduct( t2 )).rowwise().hnormalized(), (pts1.transpose()*t2).rowwise().hnormalized() );
|
VERIFY_IS_APPROX( (pts.transpose().rowwise().homogeneous() .lazyProduct( t2 )).rowwise().hnormalized(), (pts1.transpose()*t2).rowwise().hnormalized() );
|
||||||
|
|
||||||
|
VERIFY_IS_APPROX( (t2.template triangularView<Lower>() * v0.homogeneous()).eval(), (t2.template triangularView<Lower>()*hv0) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_geo_homogeneous()
|
void test_geo_homogeneous()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user