diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index dfcb6df5e..7c52a3512 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -720,6 +720,7 @@ JacobiSVD& JacobiSVD::compute_impl(con m_isInitialized = true; m_info = InvalidInput; m_nonzeroSingularValues = 0; + m_singularValues.setZero(); return *this; } if (numext::is_exactly_zero(scale)) scale = RealScalar(1); diff --git a/test/rand.cpp b/test/rand.cpp index 4131f3837..69e7cf93e 100644 --- a/test/rand.cpp +++ b/test/rand.cpp @@ -30,12 +30,10 @@ EIGEN_DONT_INLINE Scalar check_in_range(Scalar x, Scalar y) { template void check_all_in_range(Scalar x, Scalar y) { constexpr int repeats = 32; - uint64_t count = static_cast(y) - static_cast(x) + 1; + Index count = static_cast(y) - static_cast(x) + 1; ArrayX mask(count); - // ensure that `count` does not overflow the return type of `mask.size()` - VERIFY(count == static_cast(mask.size())); mask.setConstant(false); - for (uint64_t k = 0; k < count; k++) + for (Index k = 0; k < count; k++) for (int repeat = 0; repeat < repeats; repeat++) { Scalar r = check_in_range(x, y); Index i = static_cast(r) - static_cast(x); diff --git a/test/threads_fork_join.cpp b/test/threads_fork_join.cpp index b852b05f0..ec75bb77e 100644 --- a/test/threads_fork_join.cpp +++ b/test/threads_fork_join.cpp @@ -26,7 +26,7 @@ static void test_parallel_for(int granularity) { TestData test_data = make_test_data(/*num_threads=*/4, kNumTasks); std::atomic sum(0); std::function binary_do_fn = [&](Index i, Index j) { - for (int k = i; k < j; ++k) + for (Index k = i; k < j; ++k) for (uint64_t new_sum = sum; !sum.compare_exchange_weak(new_sum, new_sum + test_data.data[k]);) { }; }; diff --git a/unsupported/test/cxx11_tensor_expr.cpp b/unsupported/test/cxx11_tensor_expr.cpp index fc235d5e1..0d8e71a3c 100644 --- a/unsupported/test/cxx11_tensor_expr.cpp +++ b/unsupported/test/cxx11_tensor_expr.cpp @@ -312,6 +312,9 @@ static void test_select() { } } +// Nan propagation does currently not work like one would expect from std::max/std::min, +// so we disable it for now +#if !EIGEN_ARCH_ARM_OR_ARM64 template void test_minmax_nan_propagation_templ() { for (int size = 1; size < 17; ++size) { @@ -430,6 +433,10 @@ void test_minmax_nan_propagation_templ() { VERIFY_IS_EQUAL(val(), (size == 1 ? -kInf : kZero)); } } +#else +template +void test_minmax_nan_propagation_templ() +#endif static void test_clip() { Tensor vec(6); @@ -465,10 +472,5 @@ EIGEN_DECLARE_TEST(cxx11_tensor_expr) { CALL_SUBTEST(test_type_casting()); CALL_SUBTEST(test_select()); CALL_SUBTEST(test_clip()); - -// Nan propagation does currently not work like one would expect from std::max/std::min, -// so we disable it for now -#if !EIGEN_ARCH_ARM_OR_ARM64 CALL_SUBTEST(test_minmax_nan_propagation()); -#endif }