Make use of is_same_dense helper instead of extract_data to detect input/outputs are the same.

This commit is contained in:
Gael Guennebaud
2016-04-13 18:47:12 +02:00
parent b7716c0328
commit 6f960b83ff
4 changed files with 4 additions and 9 deletions

View File

@@ -213,8 +213,7 @@ template<int Side, typename TriangularType, typename Rhs> struct triangular_solv
template<typename Dest> inline void evalTo(Dest& dst) const
{
const typename Dest::Scalar *dst_data = internal::extract_data(dst);
if(!(is_same<RhsNestedCleaned,Dest>::value && dst_data!=0 && dst_data == extract_data(m_rhs)))
if(!is_same_dense(dst,m_rhs))
dst = m_rhs;
m_triangularMatrix.template solveInPlace<Side>(dst);
}