bug #890, add a more general routine to check that two dense object reference to the same data

This commit is contained in:
Gael Guennebaud
2015-06-10 10:09:04 +02:00
parent e6832ce93d
commit 192bce2795
4 changed files with 45 additions and 1 deletions

View File

@@ -596,7 +596,8 @@ struct permut_matrix_product_retval
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))
//if(is_same<MatrixTypeNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_matrix))
if(is_same_dense(dst, m_matrix))
{
// apply the permutation inplace
Matrix<bool,PermutationType::RowsAtCompileTime,1,0,PermutationType::MaxRowsAtCompileTime> mask(m_permutation.size());