diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-08-24 13:06:34 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-08-24 13:06:34 +0200 |
commit | 441b7eaab2569e939928ec345a1368e33fd65d31 (patch) | |
tree | 58988d7a498f1b3f55619f8a8e93d73dd2f8f418 /test | |
parent | 8132a126259051f923556fd2c31b9221e2e165e7 (diff) |
Add support for non trivial scalar factor in sparse selfadjoint * dense products, and enable +=/-= assignement for such products.
This changeset also improves the performance by working on column of the result at once.
Diffstat (limited to 'test')
-rw-r--r-- | test/sparse_product.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/sparse_product.cpp b/test/sparse_product.cpp index c518a6e55..c7c93373d 100644 --- a/test/sparse_product.cpp +++ b/test/sparse_product.cpp @@ -292,6 +292,10 @@ template<typename SparseMatrixType> void sparse_product() VERIFY_IS_APPROX(x=mUp.template selfadjointView<Upper>()*b, refX=refS*b); VERIFY_IS_APPROX(x=mLo.template selfadjointView<Lower>()*b, refX=refS*b); VERIFY_IS_APPROX(x=mS.template selfadjointView<Upper|Lower>()*b, refX=refS*b); + + VERIFY_IS_APPROX(x.noalias()+=mUp.template selfadjointView<Upper>()*b, refX+=refS*b); + VERIFY_IS_APPROX(x.noalias()-=mLo.template selfadjointView<Lower>()*b, refX-=refS*b); + VERIFY_IS_APPROX(x.noalias()+=mS.template selfadjointView<Upper|Lower>()*b, refX+=refS*b); // sparse selfadjointView with sparse matrices SparseMatrixType mSres(rows,rows); |