mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* extended the cache friendly products to support C = alpha * A * M and C += alpha * A * B
* this allows to optimize xpr like C -= lazy_product, still have to catch "scalar_product_of_lazy_product" * started to support conjugate in cache friendly products (very useful to evaluate A * B.adjoint() without evaluating B.adjoint() into a temporary * compilation fix
This commit is contained in:
@@ -315,7 +315,7 @@ template<typename Derived> class SparseMatrixBase
|
||||
operator*(const DiagonalBase<OtherDerived> &other) const;
|
||||
|
||||
// diagonal * sparse
|
||||
template<typename OtherDerived> friend
|
||||
template<typename OtherDerived> friend
|
||||
const SparseDiagonalProduct<OtherDerived,Derived>
|
||||
operator*(const DiagonalBase<OtherDerived> &lhs, const SparseMatrixBase& rhs)
|
||||
{ return SparseDiagonalProduct<OtherDerived,Derived>(lhs.derived(), rhs.derived()); }
|
||||
@@ -451,14 +451,14 @@ template<typename Derived> class SparseMatrixBase
|
||||
// Derived& setRandom();
|
||||
// Derived& setIdentity();
|
||||
|
||||
/** \internal use operator= */
|
||||
template<typename DenseDerived>
|
||||
void evalToDense(MatrixBase<DenseDerived>& dst)
|
||||
void evalToDense(MatrixBase<DenseDerived>& dst) const
|
||||
{
|
||||
dst.resize(rows(),cols());
|
||||
dst.setZero();
|
||||
for (int j=0; j<outerSize(); ++j)
|
||||
for (typename Derived::InnerIterator i(derived(),j); i; ++i)
|
||||
res.coeffRef(i.row(),i.col()) = i.value();
|
||||
dst.coeffRef(i.row(),i.col()) = i.value();
|
||||
}
|
||||
|
||||
Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> toDense() const
|
||||
|
||||
Reference in New Issue
Block a user