468 Commits

Author SHA1 Message Date
Charles Schlosser
7f58bc98b1 Refactor sparse 2023-01-23 17:55:50 +00:00
Charles Schlosser
5a7ca681d5 Fix sparse insert 2023-01-20 21:32:32 +00:00
Charles Schlosser
fa0bd2c34e improve sparse permutations 2023-01-15 03:21:25 +00:00
Charles Schlosser
9463fc95f4 change insert strategy 2023-01-11 06:24:49 +00:00
Charles Schlosser
81172cbdcb Overhaul Sparse Core 2023-01-07 22:09:42 +00:00
Rasmus Munk Larsen
dd85d26946 Revert "Avoid mixing types in CompressedStorage.h" 2022-12-19 20:09:37 +00:00
Rasmus Munk Larsen
04e4f0bb24 Add missing colon in SparseMatrix.h. 2022-12-16 21:50:00 +00:00
Rasmus Munk Larsen
3d8a8def8a Avoid mixing types in CompressedStorage.h 2022-12-16 20:11:02 +00:00
Charles Schlosser
4bb2446796 Add operators to CompressedStorageIterator 2022-12-16 16:48:50 +00:00
Charles Schlosser
44fe539150 add sparse sort inner vectors function 2022-12-01 19:28:56 +00:00
Antonio Sánchez
dcb042a87d Fix serialization for non-compressed matrices. 2022-11-30 18:16:47 +00:00
Antonio Sánchez
e7b1ad0315 Add serialization for sparse matrix and sparse vector. 2022-11-21 19:43:07 +00:00
Antonio Sánchez
8f8e36458f Remove recently added sparse assert in SparseMapBase. 2022-11-03 17:29:05 +00:00
Antonio Sánchez
adb30efb25 Add assert for invalid outerIndexPtr array in SparseMapBase. 2022-10-26 22:51:33 +00:00
Antonio Sánchez
bf48d46338 Explicitly state that indices must be sorted. 2022-10-19 18:15:29 +00:00
Laurent Rineau
7846c7387c Eigen/Sparse: fix warnings -Wunused-but-set-variable 2022-10-11 17:37:04 +00:00
Antonio Sanchez
714678fc6c Add missing ptr in realloc call. 2022-08-24 22:04:04 -07:00
Charles Schlosser
b2a13c9dd1 Sparse Core: Replace malloc/free with conditional_aligned 2022-08-23 21:44:22 +00:00
Antonio Sánchez
5a1c7807e6 Fix inner iterator for sparse block. 2022-08-03 17:26:12 +00:00
Alexander Richardson
b7668c0371 Avoid including <sstream> with EIGEN_NO_IO 2022-07-29 18:02:51 +00:00
Antonio Sánchez
5ed7a86ae9 Fix MSVC+CUDA issues. 2022-04-08 18:05:32 +00:00
Erik Schultheis
e1df3636b2 More constexpr helpers 2022-04-04 18:38:34 +00:00
Erik Schultheis
421cbf0866 Replace Eigen type metaprogramming with corresponding std types and make use of alias templates 2022-03-16 16:43:40 +00:00
Arthur
514f90c9ff Remove workarounds for bad GCC-4 warnings 2022-03-16 00:08:16 +00:00
Tobias Schlüter
cd2ba9d03e Add construct_at, destroy_at wrappers. Use throughout. 2022-03-08 20:43:22 +00:00
AlexanderMueller
dfa5176780 make SparseSolverBase and IterativeSolverBase move constructable 2022-03-08 20:03:53 +01:00
Erik Schultheis
d271a7d545 reduce float warnings (comparisons and implicit conversions) 2022-01-26 18:16:19 +00:00
Kolja Brix
8d81a2339c Reduce usage of reserved names 2022-01-10 20:53:29 +00:00
Erik Schultheis
e939c06b0e Small speed-up in row-major sparse dense product 2021-12-15 18:46:25 +00:00
Erik Schultheis
c20e908ebc turn some macros intro constexpr functions 2021-12-10 19:27:01 +00:00
Erik Schultheis
ec2fd0f7ed Require recent GCC and MSCV and removed EIGEN_HAS_CXX14 and some other feature test macros 2021-12-01 00:48:34 +00:00
Erik Schultheis
7e586635ba don't use deprecated MappedSparseMatrix 2021-11-19 15:58:04 +00:00
Erik Schultheis
b0fb5417d3 Fixed Sparse-Sparse Product in case of mixed StorageIndex types 2021-11-18 18:33:31 +00:00
Erik Schultheis
ca9c848679 use consistent StorageIndex types in SparseMatrix::Map
and `SparseMatrix::TransposedSparseMatrix`
2021-11-15 22:18:26 +00:00
Erik Schultheis
13954c4440 moved pruning code to SparseVector.h 2021-11-15 22:16:01 +00:00
sciencewhiz
4b6036e276 fix various typos 2021-09-22 16:15:06 +00:00
Rasmus Munk Larsen
6cadab6896 Clean up EIGEN_STATIC_ASSERT to only use standard c++11 static_assert. 2021-09-16 20:43:54 +00:00
Rasmus Munk Larsen
d7d0bf832d Issue an error in case of direct inclusion of internal headers. 2021-09-10 19:12:26 +00:00
Antonio Sanchez
3b48a3b964 Remove stray DynamicSparseMatrix references.
DynamicSparseMatrix has been removed.  These shouldn't be here anymore.
2021-09-02 19:47:26 +00:00
Alexander Karatarakis
4ba872bd75 Avoid leading underscore followed by cap in template identifiers 2021-08-04 22:41:52 +00:00
Antonio Sanchez
1e6c6c1576 Replace memset with fill to work for non-trivial scalars.
For custom scalars, zero is not necessarily represented by
a zeroed-out memory block (e.g. gnu MPFR). We therefore
cannot rely on `memset` if we want to fill a matrix or tensor
with zeroes. Instead, we should rely on `fill`, which for trivial
types does end up getting converted to a `memset` under-the-hood
(at least with gcc/clang).

Requires adding a `fill(begin, end, v)` to `TensorDevice`.

Replaced all potentially bad instances of memset with fill.

Fixes #2245.
2021-07-08 18:34:41 +00:00
Rasmus Munk Larsen
13fb5ab92c Fix more enum arithmetic. 2021-06-15 09:09:31 -07:00
Rasmus Munk Larsen
f64b2954c7 Fix c++20 warnings about using enums in arithmetic expressions. 2021-06-10 17:17:39 -07:00
Christoph Hertzberg
ca528593f4 Fixed/masked more implicit copy constructor warnings
(cherry picked from commit 2883e91ce5a99c391fbf28e20160176b70854992)
2021-02-27 18:44:26 +01:00
Adam Shapiro
2ac0b78739 Fixed sparse conservativeResize() when both num cols and rows decreased.
The previous implementation caused a buffer overflow trying to calculate non-
zero counts for columns that no longer exist.
2021-02-23 21:32:39 +00:00
David Tellenbach
2e8f850c78 Fix a typo in SparseMatrix documentation.
This fixes issue #2091.
2020-12-09 14:48:24 +01:00
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
27e6648074 fix #1901: warning in Mode==(Upper|Lower) 2020-09-02 15:43:58 +02:00
Gael Guennebaud
25424d91f6 Fix #1974: assertion when reserving an empty sparse matrix 2020-08-26 12:32:20 +02:00
Rasmus Munk Larsen
acab22c205 Avoid division by zero in nonZerosEstimate() for empty blocks. 2020-07-22 01:38:30 +00:00