aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/rvalue_types.cpp
Commit message (Collapse)AuthorAge
* DenseStorage safely copy/swap.Gravatar Antonio Sanchez2021-04-22
| | | | | | | | Fixes #2229. For dynamic matrices with fixed-sized storage, only copy/swap elements that have been set. Otherwise, this leads to inefficient copying, and potential UB for non-initialized elements.
* 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
* Fix #1911: add benchmark for move semantics with fixed-size matrixGravatar Sebastien Boisvert2020-06-11
| | | | | | | | | | | $ clang++ -O3 bench/bench_move_semantics.cpp -I. -std=c++11 \ -o bench_move_semantics $ ./bench_move_semantics float copy semantics: 1755.97 ms float move semantics: 55.063 ms double copy semantics: 2457.65 ms double move semantics: 55.034 ms
* bug #1746: Removed implementation of standard copy-constructor and standard ↵Gravatar Christoph Hertzberg2019-09-24
| | | | copy-assign-operator from PermutationMatrix and Transpositions to allow malloc-less std::move. Added unit-test to rvalue_types
* 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 pointer to long conversion warning.Gravatar Gael Guennebaud2016-06-02
|
* Make EIGEN_HAS_RVALUE_REFERENCES user configurableGravatar Gael Guennebaud2016-05-20
|
* Rename EIGEN_HAVE_RVALUE_REFERENCES to EIGEN_HAS_RVALUE_REFERENCESGravatar Gael Guennebaud2016-05-20
|
* Switched to MPL2 license.Gravatar Hauke Heibel2013-08-12
|
* Removed a warning when rvalue references are not unsed.Gravatar Hauke Heibel2013-08-02
|
* Added move support for Matrix and Array.Gravatar Hauke Heibel2013-08-02
Added EIGEN_HAVE_RVALUE_REFERENCES define. Added move unit tests. Removed superfluous 'inline' declarations in DenseStorage.