Fix detection of same matrices when both matrices are not handled by extract_data.

This commit is contained in:
Gael Guennebaud
2016-04-13 18:26:08 +02:00
parent 512ba0ac76
commit 2630d97c62
3 changed files with 7 additions and 4 deletions

View File

@@ -532,7 +532,8 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
template<typename RhsType, typename DstType>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const {
if(!(internal::is_same<RhsType,DstType>::value && internal::extract_data(dst) == internal::extract_data(rhs)))
const typename DstType::Scalar *dst_data = internal::extract_data(dst);
if(!(internal::is_same<RhsType,DstType>::value && dst_data!=0 && dst_data == internal::extract_data(rhs)))
dst = rhs;
this->solveInPlace(dst);
}