mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
Fix compilation in check_for_aliasing due to ambiguous specializations
This commit is contained in:
parent
6739f6bb1b
commit
e47a8928ec
@ -315,6 +315,11 @@ struct blas_traits<CwiseBinaryOp<scalar_product_op<Scalar>, NestedXpr, const Cwi
|
||||
static inline Scalar extractScalarFactor(const XprType& x)
|
||||
{ return Base::extractScalarFactor(x.lhs()) * x.rhs().functor().m_other; }
|
||||
};
|
||||
template<typename Scalar, typename Plain1, typename Plain2>
|
||||
struct blas_traits<CwiseBinaryOp<scalar_product_op<Scalar>, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1>,
|
||||
const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain2> > >
|
||||
: blas_traits<CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1> >
|
||||
{};
|
||||
|
||||
// pop opposite
|
||||
template<typename Scalar, typename NestedXpr>
|
||||
|
@ -169,7 +169,7 @@ void test_adjoint()
|
||||
// test a large static matrix only once
|
||||
CALL_SUBTEST_7( adjoint(Matrix<float, 100, 100>()) );
|
||||
|
||||
#ifdef EIGEN_TEST_PART_4
|
||||
#ifdef EIGEN_TEST_PART_13
|
||||
{
|
||||
MatrixXcf a(10,10), b(10,10);
|
||||
VERIFY_RAISES_ASSERT(a = a.transpose());
|
||||
@ -187,6 +187,13 @@ void test_adjoint()
|
||||
a.transpose() = a.adjoint();
|
||||
a.transpose() += a.adjoint();
|
||||
a.transpose() += a.adjoint() + b;
|
||||
|
||||
// regression tests for check_for_aliasing
|
||||
MatrixXd c(10,10);
|
||||
c = 1.0 * MatrixXd::Ones(10,10) + c;
|
||||
c = MatrixXd::Ones(10,10) * 1.0 + c;
|
||||
c = c + MatrixXd::Ones(10,10) .cwiseProduct( MatrixXd::Zero(10,10) );
|
||||
c = MatrixXd::Ones(10,10) * MatrixXd::Zero(10,10);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user