diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-10-06 11:32:02 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-10-06 11:32:02 +0200 |
commit | 6100d1ae64999b0cf0c37712765c2f558d1922a0 (patch) | |
tree | bfc6f1e2529246d392ffb54fada63070f24b8f9d /Eigen/src/SparseCore/SparseMatrix.h | |
parent | 1879917d355a473401f27e903aa30422d4934c41 (diff) |
Improve counting of sparse temporaries
Diffstat (limited to 'Eigen/src/SparseCore/SparseMatrix.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index f18829866..14b196480 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -665,8 +665,15 @@ class SparseMatrix YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) check_template_parameters(); const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator<OtherDerived>::Flags & RowMajorBit); - if (needToTranspose) *this = other.derived(); - else internal::call_assignment_no_alias(*this, other.derived()); + if (needToTranspose) + *this = other.derived(); + else + { + #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + #endif + internal::call_assignment_no_alias(*this, other.derived()); + } } /** Constructs a sparse matrix from the sparse selfadjoint view \a other */ |