eigen/unsupported/test
Antonio Sanchez 543e34ab9d Re-implement move assignments.
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
2021-03-10 16:55:20 +00:00
..
mpreal Make file formatting comply with POSIX and Unix standards 2020-03-23 18:09:02 +00:00
alignedvector3.cpp fix AlignedVector3 inconsisent interface with other Vector classes, default constructor and operator- were missing. 2019-12-06 21:07:39 +01:00
autodiff_scalar.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
autodiff.cpp bug #1281: fix AutoDiffScalar's make_coherent for nested expression of constant ADs. 2019-11-14 14:58:08 +01:00
bessel_functions.cpp Merging eigen/eigen. 2019-09-16 19:33:29 -04:00
BVH.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
CMakeLists.txt Idrs iterative linear solver 2021-02-27 12:09:33 +00:00
cxx11_eventcount.cpp A) fix deadlocks in thread pool caused by EventCount 2019-05-08 10:16:46 -07:00
cxx11_maxsizevector.cpp bug #1598: Let MaxSizeVector respect alignment of objects and add a unit test 2018-09-14 20:21:56 +02:00
cxx11_meta.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_non_blocking_thread_pool.cpp Clean up the Tensor header and get rid of the EIGEN_SLEEP macro. 2020-12-02 11:04:04 -08:00
cxx11_runqueue.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_argmax_gpu.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_argmax_sycl.cpp Update FindComputeCpp.cmake to fix build problems on Windows 2020-06-05 20:51:20 +00:00
cxx11_tensor_argmax.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_assign.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_block_access.cpp Tensor block evaluation cost model 2019-12-18 20:07:00 +00:00
cxx11_tensor_block_eval.cpp Fix boolean float conversion and product warnings. 2020-11-24 20:20:36 +00:00
cxx11_tensor_block_io.cpp Extend support for Packet16b: 2020-04-28 16:12:47 +00:00
cxx11_tensor_broadcast_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_broadcasting.cpp Tensor block evaluation V2 support for unary/binary/broadcsting 2019-09-24 12:52:45 -07:00
cxx11_tensor_builtins_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_cast_float16_gpu.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_casts.cpp Fix tensor casts for large packets and casts to/from std::complex 2020-06-30 18:53:55 +00:00
cxx11_tensor_chipping_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_chipping.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_comparisons.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_complex_cwise_ops_gpu.cu Disable test for 32-bit systems (e.g. ARM, i386) 2020-05-28 17:40:15 +00:00
cxx11_tensor_complex_gpu.cu Add tiled evaluation support to TensorExecutor 2018-07-25 13:51:10 -07:00
cxx11_tensor_concatenation_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_concatenation.cpp [PATCH 1/2] Misc. typos 2018-09-18 04:15:01 -04:00
cxx11_tensor_const.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_contract_gpu.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_contract_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_contraction.cpp Extend support for Packet16b: 2020-04-28 16:12:47 +00:00
cxx11_tensor_convolution_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_convolution.cpp Don't use bracket syntax in ctor. 2018-09-13 17:04:05 -07:00
cxx11_tensor_custom_index.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_custom_op_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_custom_op.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_device_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_device.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_dimension.cpp Enable DSizes type promotion with c++03 compilers 2018-09-18 10:57:00 -07:00
cxx11_tensor_empty.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_executor.cpp Remove legacy block evaluation support 2019-11-12 10:12:28 -08:00
cxx11_tensor_expr.cpp Remove leftover debug print statement in cxx11_tensor_expr.cpp 2020-10-14 22:59:51 +00:00
cxx11_tensor_fft.cpp Disable test for 32-bit systems (e.g. ARM, i386) 2020-05-28 17:40:15 +00:00
cxx11_tensor_fixed_size.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_forced_eval_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_forced_eval.cpp Do not create Tensor<const T> in cxx11_tensor_forced_eval test 2019-03-05 11:19:25 -08:00
cxx11_tensor_generator_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_generator.cpp Block evaluation for TensorGeneratorOp 2019-03-05 16:35:21 -08:00
cxx11_tensor_gpu.cu Merging eigen/eigen. 2019-09-16 19:33:29 -04:00
cxx11_tensor_ifft.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_image_op_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_image_patch_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_image_patch.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_index_list.cpp Replace deprecated Eigen::DenseIndex with Eigen::Index in TensorIndexList 2018-09-17 10:58:07 -07:00
cxx11_tensor_inflation_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_inflation.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_intdiv.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_io.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_layout_swap_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_layout_swap.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_lvalue.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_map.cpp Add test for const TensorMap underlying data mutation 2019-09-03 11:38:39 -07:00
cxx11_tensor_math_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_math.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_mixed_indices.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_morphing_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_morphing.cpp Don't crash when attempting to slice an empty tensor. 2021-02-24 18:12:51 -08:00
cxx11_tensor_move.cpp Re-implement move assignments. 2021-03-10 16:55:20 +00:00
cxx11_tensor_notification.cpp Clean up the Tensor header and get rid of the EIGEN_SLEEP macro. 2020-12-02 11:04:04 -08:00
cxx11_tensor_of_complex.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_of_const_values.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_of_float16_gpu.cu Disable test for 32-bit systems (e.g. ARM, i386) 2020-05-28 17:40:15 +00:00
cxx11_tensor_of_strings.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_padding_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_padding.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_patch_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_patch.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_random_gpu.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_random_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_random.cpp Add bit_cast for half/bfloat to/from uint16_t, fix TensorRandom 2020-11-18 20:32:35 +00:00
cxx11_tensor_reduction_gpu.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_reduction_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_reduction.cpp Update tensor reduction test to avoid undefined division of bfloat16 by int. 2020-07-22 00:35:51 +00:00
cxx11_tensor_ref.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_reverse_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_reverse.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_roundings.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_scan_gpu.cu applying EIGEN_DECLARE_TEST to *gpu* tests 2018-07-17 14:16:48 -04:00
cxx11_tensor_scan_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_scan.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_shuffling_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_shuffling.cpp Avoid warning "suggest braces around initialization of subobject". 2018-09-20 17:03:42 +02:00
cxx11_tensor_simple.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_striding_sycl.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_striding.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_sugar.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_sycl.cpp [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master branch. 2019-11-28 10:08:54 +00:00
cxx11_tensor_symmetry.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
cxx11_tensor_thread_local.cpp Update ThreadLocal to use separate Initialize/Release callables 2019-09-10 16:13:32 -07:00
cxx11_tensor_thread_pool.cpp Add support for asynchronous evaluation of tensor casting expressions. 2019-09-19 13:54:49 -07:00
cxx11_tensor_trace.cpp Make file formatting comply with POSIX and Unix standards 2020-03-23 18:09:02 +00:00
cxx11_tensor_uint128.cpp Disable test for 32-bit systems (e.g. ARM, i386) 2020-05-28 17:40:15 +00:00
cxx11_tensor_volume_patch_sycl.cpp fix test of ExtractVolumePatchesOp 2021-01-25 03:23:46 +00:00
cxx11_tensor_volume_patch.cpp fix test of ExtractVolumePatchesOp 2021-01-25 03:23:46 +00:00
dgmres.cpp Fix numerous shadow-warnings for GCC<=4.8 2018-08-28 18:32:39 +02:00
EulerAngles.cpp bug #1707: Fix deprecation warnings, or disable warnings when testing deprecated functions 2019-05-10 14:57:05 +02:00
FFT.cpp
FFTW.cpp Implement c++03 compatible fix for changeset 7a43af1a33 2019-10-09 16:00:57 +02:00
forward_adolc.cpp Fix numerous shadow-warnings for GCC<=4.8 2018-08-28 18:32:39 +02:00
gmres.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
idrs.cpp Idrs iterative linear solver 2021-02-27 12:09:33 +00:00
kronecker_product.cpp Made the kronecker_product test compile again 2018-08-14 14:08:36 -07:00
levenberg_marquardt.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
matrix_exponential.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
matrix_function.cpp Bug #1796: Make matrix squareroot usable for Map and Ref types 2019-12-20 18:10:22 +01:00
matrix_functions.h
matrix_power.cpp Fixed most conversion warnings in MatrixFunctions module 2018-11-20 16:23:28 +01:00
matrix_square_root.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
minres.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
mpreal_support.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
NonLinearOptimization.cpp relax number of iterations checks to avoid false negatives 2018-10-15 10:23:32 +02:00
NumericalDiff.cpp Fix numerous shadow-warnings for GCC<=4.8 2018-08-28 18:32:39 +02:00
openglsupport.cpp Address issues with openglsupport test. 2020-11-11 15:54:43 -08:00
polynomialsolver.cpp Various fixes in polynomial solver and its unit tests: 2018-12-09 22:54:39 +01:00
polynomialutils.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
sparse_extra.cpp Fix sparse_extra_3, disable counting temporaries for testing DynamicSparseMatrix. 2020-11-18 23:15:33 +00:00
special_functions.cpp Return nan at poles of polygamma, digamma, and zeta if limit is not defined 2021-02-19 16:35:11 +00:00
special_packetmath.cpp Define EIGEN_CPLUSPLUS and replace most __cplusplus checks. 2021-03-05 18:33:18 +00:00
splines.cpp Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00