aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
Commit message (Collapse)AuthorAge
* Re-implement move assignments.Gravatar Antonio Sanchez2021-03-10
| | | | | | | | | | | | | | | The original swap approach leads to potential undefined behavior (reading uninitialized memory) and results in unnecessary copying of data for static storage. Here we pass down the move assignment to the underlying storage. Static storage does a one-way copy, dynamic storage does a swap. Modified the tests to no longer read from the moved-from matrix/tensor, since that can lead to UB. Added a test to ensure we do not access uninitialized memory in a move. Fixes: #2119
* Define EIGEN_CPLUSPLUS and replace most __cplusplus checks.Gravatar Antonio Sanchez2021-03-05
| | | | | | | | | | | | | | | The macro `__cplusplus` is not defined correctly in MSVC unless building with the the `/Zc:__cplusplus` flag. Instead, it defines `_MSVC_LANG` to the specified c++ standard version number. Here we introduce `EIGEN_CPLUSPLUS` which will contain the c++ version number both for MSVC and otherwise. This simplifies checks for supported features. Also replaced most instances of standard version checking via `__cplusplus` with the existing `EIGEN_COMP_CXXVER` macro for better clarity. Fixes: #2170
* Fixed sparse conservativeResize() when both num cols and rows decreased.Gravatar Adam Shapiro2021-02-23
| | | | | The previous implementation caused a buffer overflow trying to calculate non- zero counts for columns that no longer exist.
* Fix #1974: assertion when reserving an empty sparse matrixGravatar Gael Guennebaud2020-08-26
|
* bug #1574: implement "sparse_matrix =,+=,-= diagonal_matrix" with smart ↵Gravatar Gael Guennebaud2019-01-28
| | | | insertion strategies of missing diagonal coeffs.
* Fix noise in sparse_basic_3 (numerical cancellation)Gravatar Gael Guennebaud2018-12-08
|
* Suppress compiler warning about unused global variable.Gravatar Rasmus Munk Larsen2018-10-22
|
* mergeGravatar Gael Guennebaud2018-10-15
|\
| * Suppress unused variable compiler warning in sparse subtest 3.Gravatar Rasmus Munk Larsen2018-10-12
| |
* | Make sparse_basic includable from sparse_extra, but disable it since ↵Gravatar Gael Guennebaud2018-10-11
|/ | | | sparse_basic(DynamicSparseMatrix) does not compile at all anyways
* bug #632: add specializations for res ?= dense +/- sparse and res ?= sparse ↵Gravatar Gael Guennebaud2018-10-10
| | | | | | +/- dense. They are rewritten as two compound assignment to by-pass hybrid dense-sparse iterator.
* Remove usage of #if EIGEN_TEST_PART_XX in unit tests that does not require ↵Gravatar Gael Guennebaud2018-07-17
| | | | them (splitting can thus be avoided for them)
* Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with ↵Gravatar Gael Guennebaud2018-07-17
| | | | | | | | | 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
* fix unit testGravatar Gael Guennebaud2017-12-14
|
* bug #1384: fix evaluation of "sparse/scalar" that used the wrong evaluation ↵Gravatar Gael Guennebaud2017-01-30
| | | | path.
* bug #1381: fix sparse.diagonal() used as a rvalue.Gravatar Gael Guennebaud2017-01-25
| | | | | | | | The problem was that is "sparse" is not const, then sparse.diagonal() must have the LValueBit flag meaning that sparse.diagonal().coeff(i) must returns a const reference, const Scalar&. However, sparse::coeff() cannot returns a reference for a non-existing zero coefficient. The trick is to return a reference to a local member of evaluator<SparseMatrix>.
* bug #1376: add missing assertion on size mismatch with compound assignment ↵Gravatar Gael Guennebaud2017-01-23
| | | | operators (e.g., mat += mat.col(j))
* Add missing .outer() member to iterators of evaluators of cwise sparse ↵Gravatar Gael Guennebaud2016-12-27
| | | | binary expression
* bug #1358: fix compilation for sparse += sparse.selfadjointView();Gravatar Gael Guennebaud2016-12-14
|
* bug #426: move operator && and || to MatrixBase and SparseMatrixBase.Gravatar Gael Guennebaud2016-11-14
|
* Fix regression in SparseMatrix::ReverseInnerIteratorGravatar Gael Guennebaud2016-11-14
|
* bug #1271: add SparseMatrix::coeffs() methods returning a 1D view of the non ↵Gravatar Gael Guennebaud2016-08-29
| | | | zero coefficients.
* bug #1258: fix compilation of Map<SparseMatrix>::coeffRefGravatar Gael Guennebaud2016-07-26
|
* bug #1238: fix SparseMatrix::sum() overload for un-compressed mode.Gravatar Gael Guennebaud2016-05-31
|
* bug #1224: fix regression in (dense*dense).sparseView() by specializing ↵Gravatar Gael Guennebaud2016-05-18
| | | | evaluator<SparseView<Product>> for sparse products only.
* Split unit testGravatar Christoph Hertzberg2016-05-11
|
* Enable and fix -Wdouble-conversion warningsGravatar Christoph Hertzberg2016-05-05
|
* bug #901: fix triangular-view with unit diagonal of sparse rectangular matrices.Gravatar Gael Guennebaud2016-02-12
|
* bug #557: make InnerIterator of sparse storage types more versatile by ↵Gravatar Gael Guennebaud2016-02-01
| | | | adding default-ctor, copy-ctor/assignment
* bug #632: add support for "dense +/- sparse" operations. The current ↵Gravatar Gael Guennebaud2016-01-29
| | | | implementation is based on SparseView to make the dense subexpression compatible with the sparse one.
* bug #1105: fix default preallocation when moving from compressed to ↵Gravatar Gael Guennebaud2015-11-06
| | | | uncompressed mode
* Add support for dense.cwiseProduct(sparse)Gravatar Gael Guennebaud2015-11-04
| | | | This also fixes a regression regarding (dense*sparse).diagonal()
* Fix compilation of sparse-triangular to dense assignmentGravatar Gael Guennebaud2015-11-04
|
* Fix ambiguous instantiationGravatar Gael Guennebaud2015-10-27
|
* bug #1088: fix setIdenity for non-compressed sparse-matrixGravatar Gael Guennebaud2015-10-25
|
* Update custom setFromTripplets API to allow passing a functor object, and ↵Gravatar Gael Guennebaud2015-10-13
| | | | add a collapseDuplicates method to cleanup the API. Also add respective unit test
* extend unit test for SparseMatrix::pruneGravatar Gael Guennebaud2015-10-13
|
* Add explicit ctor for diagonal to sparse conversionGravatar Gael Guennebaud2015-06-24
|
* Add support for sparse = diagonalGravatar Gael Guennebaud2015-06-24
|
* Split sparse_basic unit testGravatar Gael Guennebaud2015-03-19
|
* Add missing coeff/coeffRef members to Block<sparse>, and extend unit tests.Gravatar Gael Guennebaud2015-03-13
|
* Check for no-reallocation in SparseMatrix::insert (bug #974)Gravatar Gael Guennebaud2015-03-04
|
* Fix many long to int conversion warnings:Gravatar Gael Guennebaud2015-02-16
| | | | | | - fix usage of Index (API) versus StorageIndex (when multiple indexes are stored) - use StorageIndex(val) when the input has already been check - use internal::convert_index<StorageIndex>(val) when val is potentially unsafe (directly comes from user input)
* Index refactoring: StorageIndex must be used for storage only (and locally ↵Gravatar Gael Guennebaud2015-02-13
| | | | when it make sense). In all other cases use the global Index type.
* Merge Index-refactoring branch with default, fix PastixSupport, remove some ↵Gravatar Gael Guennebaud2015-02-13
|\ | | | | | | useless typedefs
| * Cleaning and add more unit tests for Ref<SparseMatrix> and Map<SparseMatrix>Gravatar Gael Guennebaud2015-02-09
| |
* | bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index ↵Gravatar Christoph Hertzberg2014-12-04
|/ | | | to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings.
* Make SparseMatrix::coeff() returns a const reference and add a non const ↵Gravatar Gael Guennebaud2014-12-01
| | | | version of SparseMatrix::diagonal()
* Regression test for (invalid) bug #900. We should make it possible somehow ↵Gravatar Christoph Hertzberg2014-10-31
| | | | to increase the problem size depending on the available RAM.
* Run sparse_basic unit tests also for rectangular matrices.Gravatar Christoph Hertzberg2014-10-31
| | | | TriangularView with UnitDiag does not work properly yet (bug #901)