Commit Graph

56 Commits

Author SHA1 Message Date
Antonio Sanchez
a8fdcae55d Fix sparse_extra_3, disable counting temporaries for testing DynamicSparseMatrix.
Multiplication of column-major `DynamicSparseMatrix`es involves three
temporaries:
- two for transposing twice to sort the coefficients
(`ConservativeSparseSparseProduct.h`, L160-161)
- one for a final copy assignment (`SparseAssign.h`, L108)
The latter is avoided in an optimization for `SparseMatrix`.

Since `DynamicSparseMatrix` is deprecated in favor of `SparseMatrix`, it's not
worth the effort to optimize further, so I simply disabled counting
temporaries via a macro.

Note that due to the inclusion of `sparse_product.cpp`, the `sparse_extra`
tests actually re-run all the original `sparse_product` tests as well.

We may want to simply drop the `DynamicSparseMatrix` tests altogether, which
would eliminate the test duplication.

Related to #2048
2020-11-18 23:15:33 +00:00
Gael Guennebaud
ab615e4114 Save one extra temporary when assigning a sparse product to a row-major sparse matrix 2020-05-30 23:15:12 +02:00
Gael Guennebaud
de70671937 Oopps, EIGEN_COMP_MSVC is not available before including Eigen. 2018-07-20 17:51:17 +02:00
Gael Guennebaud
56a750b6cc Disable optimization for sparse_product unit test with MSVC 2013, otherwise it takes several hours to build. 2018-07-20 08:36:38 -07:00
Gael Guennebaud
82f0ce2726 Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }.
This provide several advantages:
- more flexibility in designing unit tests
- unit tests can be glued to speed up compilation
- unit tests are compiled with same predefined macros, which is a requirement for zapcc
2018-07-17 14:46:15 +02:00
Gael Guennebaud
80142362ac Fix mixing types in sparse matrix products. 2017-09-02 22:50:20 +02:00
Gael Guennebaud
891ac03483 Fix dense * sparse-selfadjoint-view product. 2017-04-25 13:58:10 +02:00
Gael Guennebaud
0fe278f7be bug #1379: fix compilation in sparse*diagonal*dense with openmp 2017-01-21 23:27:01 +01:00
Gael Guennebaud
441b7eaab2 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.
2016-08-24 13:06:34 +02:00
Gael Guennebaud
1fa15ceee6 Extend sparse*sparse product unit test to check that the expected implementation is used (conservative vs auto pruning). 2016-05-18 16:50:54 +02:00
Christoph Hertzberg
dacb469bc9 Enable and fix -Wdouble-conversion warnings 2016-05-05 13:35:45 +02:00
Gael Guennebaud
73f692d16b Fix ambiguous instantiation 2015-10-27 11:01:37 +01:00
Gael Guennebaud
e6f8c5c325 Add support to directly evaluate the product of two sparse matrices within a dense matrix. 2015-10-26 18:20:00 +01:00
Gael Guennebaud
f899aeb301 bug #650: fix sparse * dense wrt noalias and compound assignment 2015-06-09 18:33:24 +02:00
Gael Guennebaud
5a3c48e3c6 bug #942: fix dangling references in evaluator of diagonal * sparse products. 2015-04-18 22:43:27 +02:00
Gael Guennebaud
3105986e71 bug #875: remove broken SparseMatrixBase::nonZeros and introduce a nonZerosEstimate() method to sparse evaluators for internal uses.
Factorize some code in SparseCompressedBase.
2015-04-01 22:27:34 +02:00
Gael Guennebaud
fc202bab39 Index refactoring: StorageIndex must be used for storage only (and locally when it make sense). In all other cases use the global Index type. 2015-02-13 18:57:41 +01:00
Christoph Hertzberg
e8cdbedefb bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings. 2014-12-04 22:48:53 +01:00
Gael Guennebaud
d44d432baa Re-enable products with triangular views of sparse matrices: we simply have to treat them as a sparse matrix. 2014-10-06 16:11:26 +02:00
Gael Guennebaud
2a251ffab0 Implement evaluator for sparse-selfadjoint products 2014-07-22 09:32:40 +02:00
Gael Guennebaud
a325d1cb1e merge with default branch 2014-07-18 11:02:22 +02:00
Gael Guennebaud
a53f2b0e43 bug #838: add unit test for fill-in in sparse outer product and fix abusive fill-in. 2014-07-16 17:00:54 +02:00
Gael Guennebaud
2bdb3b1afd Extend dense*sparse product unit tests 2014-07-15 11:00:16 +02:00
Gael Guennebaud
a20e2462bf Fix bug #838: detect outer products from either the lhs or rhs 2014-07-11 17:15:26 +02:00
Gael Guennebaud
c0f76ce2cf Fix bug #838: fix dense * sparse and sparse * dense outer products 2014-07-11 16:25:36 +02:00
Gael Guennebaud
ed461ba9bc Fix sparse_product/sparse_extra unit tests 2014-02-17 09:57:47 +01:00
Gael Guennebaud
4b6b3f310f Fix a few Index to int buggy conversions 2014-02-15 09:35:23 +01:00
Gael Guennebaud
4f14b3fa72 Fix bug #611: diag * sparse * diag 2013-07-05 22:42:46 +02:00
Desire NUENTSA
9f035c876a Fiw bug #553: add support for sparse matrix time sparse self-adjoint view products 2013-06-28 22:27:45 +02:00
Gael Guennebaud
fc27cbd914 Fix bug #611: fix const qualifier in cwiseProduct(sparse,dense) and SparseDiagonalProduct::InnerIterator 2013-06-28 17:10:53 +02:00
Gael Guennebaud
98ce4455dd fix sparse vector assignment from a sparse matrix 2013-03-06 11:58:22 +01:00
Gael Guennebaud
fec6df1f7d fix dense=sparse*diagonal (there was an issue in the values returned by the .outer() function of the related iterators) 2012-10-03 09:06:19 +02:00
Gael Guennebaud
f30ca7ed7e extend unit tests to check rectangular matrices for sparse*diagonal products 2012-10-02 23:03:06 +02:00
Benoit Jacob
69124cfca2 Automatic relicensing to MPL2 using Keirs script. Manual fixup follows. 2012-07-13 14:42:47 -04:00
Gael Guennebaud
6f92b75874 add aliasing test for sparse*sparse product 2011-12-20 18:10:22 +01:00
Gael Guennebaud
1ddf88060b update sparse*sparse product: the default is now a conservative algorithm preserving symbolic non zeros. The previous with auto pruning of the small value is avaible doing: (A*B).pruned() or (A*B).pruned(ref) or (A*B).pruned(ref,eps) 2011-10-24 11:44:53 +02:00
Gael Guennebaud
70df09b76d move DynamicSparseMatrix to SparseExtra 2011-10-24 09:31:33 +02:00
Gael Guennebaud
42e2578ef9 the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
2011-08-19 14:18:05 +02:00
Gael Guennebaud
22c7609d72 extend sparse product unit tests 2011-03-22 11:58:22 +01:00
Gael Guennebaud
902af035d3 merge 2010-12-31 17:26:48 +01:00
David J. Luitz
11e253bc10 [Sparse] Added regression tests for the two bugfixes, the code passes all sparse_product tests 2010-12-30 15:16:23 +01:00
Benoit Jacob
4716040703 bug #86 : use internal:: namespace instead of ei_ prefix 2010-10-25 10:15:22 -04:00
Gael Guennebaud
e313826890 add mixed sparse-dense outer product 2010-06-25 11:36:38 +02:00
Gael Guennebaud
1927b4dff5 Fix use of nesting types in SparseTranspose and split the big SparseProduct.h file 2010-06-25 10:26:24 +02:00
Hauke Heibel
f1679c7185 Utilize Index in all unit tests. 2010-06-20 17:37:56 +02:00
Gael Guennebaud
c5d7c9f0de remove the Triangular suffix to Upper, Lower, UnitLower, etc,
and remove the respective bit flags
2010-01-07 21:15:32 +01:00
Gael Guennebaud
fcc3be5dce a couple of fixes after thye merge 2009-12-23 09:07:01 +01:00
Gael Guennebaud
0529ecfe1b Big refactoring/cleaning in the spasre module with
in particular the addition of a selfadjointView, and the
extension of triangularView. The rest is cleaning and does not
change/extend the API.
2009-11-18 14:52:52 +01:00
Gael Guennebaud
1e62e0b0d8 more ET refactoring:
* extend Cwise for multiple storage base class
* a lot of cleaning in the Sparse module
2009-11-17 16:04:19 +01:00
Benoit Jacob
2840ac7e94 big huge changes, so i dont remember everything.
* renaming, e.g. LU ---> FullPivLU
* split tests framework: more robust, e.g. dont generate empty tests if a number is skipped
* make all remaining tests use that splitting, as needed.
* Fix 4x4 inversion (see stable branch)
* Transform::inverse() and geo_transform test : adapt to new inverse() API, it was also trying to instantiate inverse() for 3x4 matrices.
* CMakeLists: more robust regexp to parse the version number
* misc fixes in unit tests
2009-10-28 18:19:29 -04:00