Workaround fixing aliasing issue in x = SparseLU::solve(x)

This commit is contained in:
Gael Guennebaud
2013-11-15 11:19:19 +01:00
parent 6b471f205e
commit 46dd1bb1be
2 changed files with 5 additions and 2 deletions

View File

@@ -553,7 +553,8 @@ struct permut_matrix_product_retval
template<typename Dest> inline void evalTo(Dest& dst) const
{
const Index n = Side==OnTheLeft ? rows() : cols();
// FIXME we need an is_same for expression that is not sensitive to constness. For instance
// is_same_xpr<Block<const Matrix>, Block<Matrix> >::value should be true.
if(is_same<MatrixTypeNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_matrix))
{
// apply the permutation inplace