mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Remove trailing semicolon from EIGEN_UNUSED_VARIABLE macro
libeigen/eigen!2301 Closes #3007 Co-authored-by: Pavel Guzenfeld <67074795+PavelGuzenfeld@users.noreply.github.com>
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
e0b8498eef
commit
a0e30732a7
@@ -131,7 +131,7 @@ class DenseStorage_impl<T, Size, Dynamic, Cols, Options> {
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index size, Index rows, Index /*cols*/)
|
||||
: m_rows(rows) {
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
EIGEN_UNUSED_VARIABLE(size)
|
||||
EIGEN_UNUSED_VARIABLE(size);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl& operator=(const DenseStorage_impl& other) {
|
||||
smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
|
||||
@@ -165,7 +165,7 @@ class DenseStorage_impl<T, Size, Rows, Dynamic, Options> {
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index size, Index /*rows*/, Index cols)
|
||||
: m_cols(cols) {
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
EIGEN_UNUSED_VARIABLE(size)
|
||||
EIGEN_UNUSED_VARIABLE(size);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl& operator=(const DenseStorage_impl& other) {
|
||||
smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
|
||||
@@ -200,7 +200,7 @@ class DenseStorage_impl<T, Size, Dynamic, Dynamic, Options> {
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index size, Index rows, Index cols)
|
||||
: m_rows(rows), m_cols(cols) {
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
EIGEN_UNUSED_VARIABLE(size)
|
||||
EIGEN_UNUSED_VARIABLE(size);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl& operator=(const DenseStorage_impl& other) {
|
||||
smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
|
||||
|
||||
@@ -367,7 +367,7 @@ struct redux_impl<Func, Evaluator, LinearVectorizedTraversal, CompleteUnrolling>
|
||||
|
||||
template <typename XprType>
|
||||
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Evaluator& eval, const Func& func, const XprType& xpr) {
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(xpr)
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(xpr);
|
||||
eigen_assert(xpr.rows() > 0 && xpr.cols() > 0 && "you are using an empty matrix");
|
||||
if (VectorizedSize > 0) {
|
||||
Scalar res = func.predux(
|
||||
|
||||
@@ -281,7 +281,7 @@ class Ref : public RefBase<Ref<PlainObjectType, Options, StrideType> > {
|
||||
EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);
|
||||
// Construction must pass since we will not create temporary storage in the non-const case.
|
||||
const bool success = Base::construct(expr.derived());
|
||||
EIGEN_UNUSED_VARIABLE(success)
|
||||
EIGEN_UNUSED_VARIABLE(success);
|
||||
eigen_assert(success);
|
||||
}
|
||||
template <typename Derived>
|
||||
@@ -299,7 +299,7 @@ class Ref : public RefBase<Ref<PlainObjectType, Options, StrideType> > {
|
||||
EIGEN_STATIC_ASSERT(!Derived::IsPlainObjectBase, THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
|
||||
// Construction must pass since we will not create temporary storage in the non-const case.
|
||||
const bool success = Base::construct(expr.const_cast_derived());
|
||||
EIGEN_UNUSED_VARIABLE(success)
|
||||
EIGEN_UNUSED_VARIABLE(success);
|
||||
eigen_assert(success);
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ class Ref<const TPlainObjectType, Options, StrideType>
|
||||
EIGEN_DEVICE_FUNC void construct(const Expression& expr, internal::false_type) {
|
||||
internal::call_assignment_no_alias(m_object, expr, internal::assign_op<Scalar, Scalar>());
|
||||
const bool success = Base::construct(m_object);
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(success)
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(success);
|
||||
eigen_assert(success);
|
||||
}
|
||||
|
||||
|
||||
@@ -1866,7 +1866,7 @@ EIGEN_ALWAYS_INLINE void disassembleResults(__vector_quad* c0, PacketBlock<Scala
|
||||
if (GEMV_GETN_COMPLEX(N) > iter1) { \
|
||||
if (GEMV_IS_COMPLEX_FLOAT) { \
|
||||
GEMV_LOADPAIR2_COL_COMPLEX_MMA(iter2, iter2); \
|
||||
EIGEN_UNUSED_VARIABLE(a##iter3) \
|
||||
EIGEN_UNUSED_VARIABLE(a##iter3); \
|
||||
} else { \
|
||||
GEMV_LOADPAIR2_COL_COMPLEX_MMA(iter2, iter2 << 1); \
|
||||
GEMV_LOADPAIR2_COL_COMPLEX_MMA(iter3, iter3 << 1); \
|
||||
|
||||
@@ -314,9 +314,9 @@ inline bool useSpecificBlockingSizes(Index& k, Index& m, Index& n) {
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(k)
|
||||
EIGEN_UNUSED_VARIABLE(m)
|
||||
EIGEN_UNUSED_VARIABLE(n)
|
||||
EIGEN_UNUSED_VARIABLE(k);
|
||||
EIGEN_UNUSED_VARIABLE(m);
|
||||
EIGEN_UNUSED_VARIABLE(n);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1051,7 +1051,7 @@ template <typename T>
|
||||
EIGEN_DEVICE_FUNC constexpr void ignore_unused_variable(const T&) {}
|
||||
} // namespace internal
|
||||
} // namespace Eigen
|
||||
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
|
||||
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var)
|
||||
|
||||
#if !defined(EIGEN_ASM_COMMENT)
|
||||
#if EIGEN_COMP_GNUC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64 || EIGEN_ARCH_RISCV)
|
||||
|
||||
@@ -267,7 +267,7 @@ EIGEN_DEVICE_FUNC inline void* aligned_realloc(void* ptr, std::size_t new_size,
|
||||
|
||||
void* result;
|
||||
#if (EIGEN_DEFAULT_ALIGN_BYTES == 0) || EIGEN_MALLOC_ALREADY_ALIGNED
|
||||
EIGEN_UNUSED_VARIABLE(old_size)
|
||||
EIGEN_UNUSED_VARIABLE(old_size);
|
||||
|
||||
check_that_malloc_is_allowed();
|
||||
EIGEN_USING_STD(realloc)
|
||||
|
||||
@@ -100,8 +100,8 @@ EIGEN_DECLARE_TEST(bdcsvd) {
|
||||
for (int i = 0; i < g_repeat; i++) {
|
||||
int r = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2), c = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2);
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(r)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(c)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(r);
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(c);
|
||||
|
||||
CALL_SUBTEST_10((compare_bdc_jacobi<MatrixXf>(MatrixXf(r, c))));
|
||||
CALL_SUBTEST_11((compare_bdc_jacobi<MatrixXd>(MatrixXd(r, c))));
|
||||
|
||||
@@ -194,7 +194,7 @@ EIGEN_DECLARE_TEST(boostmultiprec) {
|
||||
|
||||
CALL_SUBTEST_8(generalized_eigensolver_real(Mat(s, s)));
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
CALL_SUBTEST_9(
|
||||
|
||||
@@ -536,11 +536,11 @@ EIGEN_DECLARE_TEST(cholesky) {
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE);
|
||||
CALL_SUBTEST_2(cholesky(MatrixXd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2);
|
||||
CALL_SUBTEST_6(cholesky_cplx(MatrixXcd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
// empty matrix, regression test for Bug 785:
|
||||
CALL_SUBTEST_2(cholesky(MatrixXd(0, 0)));
|
||||
@@ -566,5 +566,5 @@ EIGEN_DECLARE_TEST(cholesky) {
|
||||
CALL_SUBTEST_2(cholesky_rowmajor_boundary<double>());
|
||||
CALL_SUBTEST_8(cholesky_rowmajor_boundary<float>());
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(nb_temporaries)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(nb_temporaries);
|
||||
}
|
||||
|
||||
@@ -60,6 +60,6 @@ EIGEN_DECLARE_TEST(determinant) {
|
||||
CALL_SUBTEST_5(determinant(Matrix<std::complex<double>, 10, 10>()));
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 4);
|
||||
CALL_SUBTEST_6(determinant(MatrixXd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ EIGEN_DECLARE_TEST(eigensolver_complex) {
|
||||
CALL_SUBTEST_2(eigensolver(MatrixXcd(s, s)));
|
||||
CALL_SUBTEST_3(eigensolver(Matrix<std::complex<float>, 1, 1>()));
|
||||
CALL_SUBTEST_4(eigensolver(Matrix3f()));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
CALL_SUBTEST_1(eigensolver_verify_assert(Matrix4cf()));
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 4);
|
||||
@@ -170,5 +170,5 @@ EIGEN_DECLARE_TEST(eigensolver_complex) {
|
||||
// Test custom complex scalar type.
|
||||
CALL_SUBTEST_6(eigensolver(Matrix<CustomComplex<double>, 5, 5>()));
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
@@ -134,6 +134,6 @@ EIGEN_DECLARE_TEST(eigensolver_generalized_real) {
|
||||
CALL_SUBTEST_3(generalized_eigensolver_real(Matrix<double, 1, 1>()));
|
||||
CALL_SUBTEST_4(generalized_eigensolver_real(Matrix2d()));
|
||||
CALL_SUBTEST_5(generalized_eigensolver_assert<MatrixXd>());
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ EIGEN_DECLARE_TEST(eigensolver_generic) {
|
||||
CALL_SUBTEST_1(eigensolver(Matrix4f()));
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 4);
|
||||
CALL_SUBTEST_2(eigensolver(MatrixXd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
// some trivial but implementation-wise tricky cases
|
||||
CALL_SUBTEST_2(eigensolver(MatrixXd(1, 1)));
|
||||
@@ -230,5 +230,5 @@ EIGEN_DECLARE_TEST(eigensolver_generic) {
|
||||
|
||||
CALL_SUBTEST_2(eigensolver_generic_extra<0>());
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ EIGEN_DECLARE_TEST(eigensolver_selfadjoint) {
|
||||
CALL_SUBTEST_4(selfadjointeigensolver(MatrixXd(s, s)));
|
||||
CALL_SUBTEST_5(selfadjointeigensolver(MatrixXcd(s, s)));
|
||||
CALL_SUBTEST_9(selfadjointeigensolver(Matrix<std::complex<double>, Dynamic, Dynamic, RowMajor>(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
// some trivial but implementation-wise tricky cases
|
||||
CALL_SUBTEST_4(selfadjointeigensolver(MatrixXd(1, 1)));
|
||||
@@ -278,5 +278,5 @@ EIGEN_DECLARE_TEST(eigensolver_selfadjoint) {
|
||||
CALL_SUBTEST_8(SelfAdjointEigenSolver<MatrixXf> tmp1(s));
|
||||
CALL_SUBTEST_8(Tridiagonalization<MatrixXf> tmp2(s));
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ struct matrix_inverse {
|
||||
template <typename T>
|
||||
struct numeric_limits_test {
|
||||
EIGEN_DEVICE_FUNC void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const {
|
||||
EIGEN_UNUSED_VARIABLE(in)
|
||||
EIGEN_UNUSED_VARIABLE(in);
|
||||
int out_idx = i * 5;
|
||||
out[out_idx++] = numext::numeric_limits<float>::epsilon();
|
||||
out[out_idx++] = (numext::numeric_limits<float>::max)();
|
||||
|
||||
@@ -104,7 +104,7 @@ void run_and_compare_to_gpu(const Kernel& ker, int n, const Input& in, Output& o
|
||||
struct compile_time_device_info {
|
||||
EIGEN_DEVICE_FUNC void operator()(int i, const int* /*in*/, int* info) const {
|
||||
if (i == 0) {
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
#if defined(__CUDA_ARCH__)
|
||||
info[0] = int(__CUDA_ARCH__ + 0);
|
||||
#endif
|
||||
|
||||
@@ -136,7 +136,7 @@ EIGEN_DEVICE_FUNC void run_serialized(std::index_sequence<Indices...>, std::inde
|
||||
read_ptr = Eigen::deserialize(read_ptr, read_end, input_size);
|
||||
// Create value-type instances to populate.
|
||||
auto args = make_tuple(typename std::decay<Args>::type{}...);
|
||||
EIGEN_UNUSED_VARIABLE(args) // Avoid NVCC compile warning.
|
||||
EIGEN_UNUSED_VARIABLE(args); // Avoid NVCC compile warning.
|
||||
// NVCC 9.1 requires us to spell out the template parameters explicitly.
|
||||
read_ptr = Eigen::deserialize(read_ptr, read_end, get<Indices, typename std::decay<Args>::type...>(args)...);
|
||||
|
||||
@@ -262,7 +262,7 @@ auto run_serialized_on_gpu(size_t buffer_capacity_hint, std::index_sequence<Indi
|
||||
|
||||
// Deserialize outputs.
|
||||
auto args_tuple = test_detail::tie(args...);
|
||||
EIGEN_UNUSED_VARIABLE(args_tuple) // Avoid NVCC compile warning.
|
||||
EIGEN_UNUSED_VARIABLE(args_tuple); // Avoid NVCC compile warning.
|
||||
c_host_ptr = Eigen::deserialize(c_host_ptr, host_data_end, test_detail::get<OutputIndices, Args&...>(args_tuple)...);
|
||||
|
||||
// Maybe deserialize return value, properly handling void.
|
||||
@@ -436,7 +436,7 @@ auto run_with_hint(size_t buffer_capacity_hint, Kernel kernel, Args&&... args) -
|
||||
#ifdef EIGEN_GPUCC
|
||||
return run_on_gpu_with_hint(buffer_capacity_hint, kernel, std::forward<Args>(args)...);
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(buffer_capacity_hint)
|
||||
EIGEN_UNUSED_VARIABLE(buffer_capacity_hint);
|
||||
return run_on_cpu(kernel, std::forward<Args>(args)...);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -790,7 +790,7 @@ void check_tutorial_examples() {
|
||||
VERIFY_IS_EQUAL(int(slice1.SizeAtCompileTime), 6);
|
||||
VERIFY_IS_EQUAL(int(slice2.SizeAtCompileTime), 6);
|
||||
auto slice3 = A(all, seq(fix<0>, last, fix<2>));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(slice3)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(slice3);
|
||||
VERIFY_IS_EQUAL(int(slice3.RowsAtCompileTime), kRows);
|
||||
VERIFY_IS_EQUAL(int(slice3.ColsAtCompileTime), (kCols + 1) / 2);
|
||||
}
|
||||
|
||||
@@ -150,14 +150,14 @@ EIGEN_DECLARE_TEST(inverse) {
|
||||
|
||||
s = internal::random<int>(50, 320);
|
||||
CALL_SUBTEST_5(inverse(MatrixXf(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
CALL_SUBTEST_5(inverse_zerosized<float>());
|
||||
CALL_SUBTEST_5(inverse(MatrixXf(0, 0)));
|
||||
CALL_SUBTEST_5(inverse(MatrixXf(1, 1)));
|
||||
|
||||
s = internal::random<int>(25, 100);
|
||||
CALL_SUBTEST_6(inverse(MatrixXcd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
CALL_SUBTEST_7(inverse(Matrix4d()));
|
||||
CALL_SUBTEST_7(inverse(Matrix<double, 4, 4, DontAlign>()));
|
||||
|
||||
@@ -122,7 +122,7 @@ void msvc_workaround() {
|
||||
const Foo::Bar a;
|
||||
const Foo::Bar b;
|
||||
const Foo::Bar c = std::max EIGEN_NOT_A_MACRO(a, b);
|
||||
EIGEN_UNUSED_VARIABLE(c)
|
||||
EIGEN_UNUSED_VARIABLE(c);
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(jacobisvd) {
|
||||
@@ -143,8 +143,8 @@ EIGEN_DECLARE_TEST(jacobisvd) {
|
||||
for (int i = 0; i < g_repeat; i++) {
|
||||
int r = internal::random<int>(1, 30), c = internal::random<int>(1, 30);
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(r)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(c)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(r);
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(c);
|
||||
|
||||
CALL_SUBTEST_12((jacobisvd_thin_options<Matrix3f>()));
|
||||
CALL_SUBTEST_13((jacobisvd_full_options<Matrix3f>()));
|
||||
|
||||
@@ -97,5 +97,5 @@ EIGEN_DECLARE_TEST(nesting_ops) {
|
||||
CALL_SUBTEST_2(run_nesting_ops_2(MatrixXcd(s, s)));
|
||||
CALL_SUBTEST_3(run_nesting_ops_2(Matrix4f()));
|
||||
CALL_SUBTEST_4(run_nesting_ops_2(Matrix2d()));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
@@ -214,11 +214,11 @@ EIGEN_DECLARE_TEST(product_notemporary) {
|
||||
s = internal::random<int>(16, EIGEN_TEST_MAX_SIZE);
|
||||
CALL_SUBTEST_1(product_notemporary(MatrixXf(s, s)));
|
||||
CALL_SUBTEST_2(product_notemporary(MatrixXd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(16, EIGEN_TEST_MAX_SIZE / 2);
|
||||
CALL_SUBTEST_3(product_notemporary(MatrixXcf(s, s)));
|
||||
CALL_SUBTEST_4(product_notemporary(MatrixXcd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,19 +136,19 @@ EIGEN_DECLARE_TEST(product_selfadjoint) {
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2);
|
||||
CALL_SUBTEST_4(product_selfadjoint(MatrixXcf(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2);
|
||||
CALL_SUBTEST_5(product_selfadjoint(MatrixXcd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE);
|
||||
CALL_SUBTEST_6(product_selfadjoint(MatrixXd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE);
|
||||
CALL_SUBTEST_7(product_selfadjoint(Matrix<float, Dynamic, Dynamic, RowMajor>(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
// Deterministic blocking boundary tests (outside g_repeat).
|
||||
|
||||
@@ -153,12 +153,12 @@ EIGEN_DECLARE_TEST(product_syrk) {
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE);
|
||||
CALL_SUBTEST_1(syrk(MatrixXf(s, s)));
|
||||
CALL_SUBTEST_2(syrk(MatrixXd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2);
|
||||
CALL_SUBTEST_3(syrk(MatrixXcf(s, s)));
|
||||
CALL_SUBTEST_4(syrk(MatrixXcd(s, s)));
|
||||
CALL_SUBTEST_5(syrk(Matrix<bfloat16, Dynamic, Dynamic>(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ EIGEN_DECLARE_TEST(product_trmv) {
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE / 2);
|
||||
CALL_SUBTEST_4(trmv(MatrixXcf(s, s)));
|
||||
CALL_SUBTEST_5(trmv(MatrixXcd(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
|
||||
s = internal::random<int>(1, EIGEN_TEST_MAX_SIZE);
|
||||
CALL_SUBTEST_6(trmv(Matrix<float, Dynamic, Dynamic, RowMajor>(s, s)));
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ EIGEN_DECLARE_TEST(rand) {
|
||||
|
||||
CALL_SUBTEST_11(check_histogram<int32_t>(-5, 5, 11));
|
||||
int bins = 100;
|
||||
EIGEN_UNUSED_VARIABLE(bins)
|
||||
EIGEN_UNUSED_VARIABLE(bins);
|
||||
CALL_SUBTEST_11(check_histogram<int32_t>(-3333, -3333 + bins * (3333 / bins) - 1, bins));
|
||||
bins = 1000;
|
||||
CALL_SUBTEST_11(check_histogram<int32_t>(-RAND_MAX + 10, -RAND_MAX + 10 + bins * (RAND_MAX / bins) - 1, bins));
|
||||
|
||||
@@ -90,5 +90,5 @@ EIGEN_DECLARE_TEST(real_qz) {
|
||||
CALL_SUBTEST_4(real_qz(Matrix2d()));
|
||||
}
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ void selfadjoint(const MatrixType& m) {
|
||||
|
||||
void bug_159() {
|
||||
Matrix3d m = Matrix3d::Random().selfadjointView<Lower>();
|
||||
EIGEN_UNUSED_VARIABLE(m)
|
||||
EIGEN_UNUSED_VARIABLE(m);
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(selfadjoint) {
|
||||
@@ -59,7 +59,7 @@ EIGEN_DECLARE_TEST(selfadjoint) {
|
||||
CALL_SUBTEST_4(selfadjoint(MatrixXcd(s, s)));
|
||||
CALL_SUBTEST_5(selfadjoint(Matrix<float, Dynamic, Dynamic, RowMajor>(s, s)));
|
||||
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
CALL_SUBTEST_1(bug_159());
|
||||
|
||||
@@ -119,5 +119,5 @@ EIGEN_DECLARE_TEST(swap) {
|
||||
CALL_SUBTEST_2(swap(Matrix4d())); // fixed size, possible vectorization
|
||||
CALL_SUBTEST_3(swap(MatrixXd(s, s))); // dyn size, no vectorization
|
||||
CALL_SUBTEST_4(swap(MatrixXf(s, s))); // dyn size, possible vectorization
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(s);
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ void test_matrix_inverse(size_t num_elements, const Input& in, Output& out) {
|
||||
template <typename DataType, typename Input, typename Output>
|
||||
void test_numeric_limits(const Input& in, Output& out) {
|
||||
auto operation = [](const typename DataType::Scalar* in, typename DataType::Scalar* out) {
|
||||
EIGEN_UNUSED_VARIABLE(in)
|
||||
EIGEN_UNUSED_VARIABLE(in);
|
||||
out[0] = numext::numeric_limits<float>::epsilon();
|
||||
out[1] = (numext::numeric_limits<float>::max)();
|
||||
out[2] = (numext::numeric_limits<float>::min)();
|
||||
|
||||
@@ -325,16 +325,16 @@ void triangular_at_blocking_boundaries() {
|
||||
|
||||
void bug_159() {
|
||||
Matrix3d m = Matrix3d::Random().triangularView<Lower>();
|
||||
EIGEN_UNUSED_VARIABLE(m)
|
||||
EIGEN_UNUSED_VARIABLE(m);
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(triangular) {
|
||||
int maxsize = (std::min)(EIGEN_TEST_MAX_SIZE, 20);
|
||||
for (int i = 0; i < g_repeat; i++) {
|
||||
int r = internal::random<int>(2, maxsize);
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(r)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(r);
|
||||
int c = internal::random<int>(2, maxsize);
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(c)
|
||||
TEST_SET_BUT_UNUSED_VARIABLE(c);
|
||||
|
||||
CALL_SUBTEST_1(triangular_square(Matrix<float, 1, 1>()));
|
||||
CALL_SUBTEST_2(triangular_square(Matrix<float, 2, 2>()));
|
||||
|
||||
@@ -23,24 +23,23 @@ void basic_tuple_test() {
|
||||
tuple<int, float, double> tuple3{7, 11.0f, 13.0};
|
||||
// Default construction.
|
||||
tuple<> tuple0default;
|
||||
EIGEN_UNUSED_VARIABLE(tuple0default)
|
||||
EIGEN_UNUSED_VARIABLE(tuple0default);
|
||||
tuple<int> tuple1default;
|
||||
EIGEN_UNUSED_VARIABLE(tuple1default)
|
||||
EIGEN_UNUSED_VARIABLE(tuple1default);
|
||||
tuple<int, float> tuple2default;
|
||||
EIGEN_UNUSED_VARIABLE(tuple2default)
|
||||
EIGEN_UNUSED_VARIABLE(tuple2default);
|
||||
tuple<int, float, double> tuple3default;
|
||||
EIGEN_UNUSED_VARIABLE(tuple3default)
|
||||
EIGEN_UNUSED_VARIABLE(tuple3default);
|
||||
|
||||
// Assignment.
|
||||
tuple<> tuple0b = tuple0;
|
||||
EIGEN_UNUSED_VARIABLE(tuple0b)
|
||||
EIGEN_UNUSED_VARIABLE(tuple0b);
|
||||
decltype(tuple1) tuple1b = tuple1;
|
||||
EIGEN_UNUSED_VARIABLE(tuple1b)
|
||||
EIGEN_UNUSED_VARIABLE(tuple1b);
|
||||
decltype(tuple2) tuple2b = tuple2;
|
||||
EIGEN_UNUSED_VARIABLE(tuple2b)
|
||||
EIGEN_UNUSED_VARIABLE(tuple2b);
|
||||
decltype(tuple3) tuple3b = tuple3;
|
||||
EIGEN_UNUSED_VARIABLE(tuple3b)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(tuple3b);
|
||||
// get.
|
||||
VERIFY_IS_EQUAL(tuple_impl::get<0>(tuple3), 7);
|
||||
VERIFY_IS_EQUAL(tuple_impl::get<1>(tuple3), 11.0f);
|
||||
|
||||
@@ -214,14 +214,14 @@ struct TrackedVisitor {
|
||||
return this->packet(p, i, j);
|
||||
}
|
||||
void operator()(Scalar v, Index i, Index j) {
|
||||
EIGEN_UNUSED_VARIABLE(v)
|
||||
EIGEN_UNUSED_VARIABLE(v);
|
||||
visited.emplace_back(i, j);
|
||||
scalarOps++;
|
||||
}
|
||||
|
||||
template <typename Packet>
|
||||
void packet(Packet p, Index i, Index j) {
|
||||
EIGEN_UNUSED_VARIABLE(p)
|
||||
EIGEN_UNUSED_VARIABLE(p);
|
||||
for (int k = 0; k < PacketSize; k++)
|
||||
if (RowMajor)
|
||||
visited.emplace_back(i, j + k);
|
||||
|
||||
@@ -1348,8 +1348,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
void evalTyped(Scalar* buffer) const {
|
||||
// columns in left side, rows in right side
|
||||
const Index k = this->m_k_size;
|
||||
EIGEN_UNUSED_VARIABLE(k)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(k);
|
||||
// rows in left side
|
||||
const Index m = this->m_i_size;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class GpuStreamDevice : public StreamInterface {
|
||||
} else {
|
||||
int num_devices;
|
||||
gpuError_t err = gpuGetDeviceCount(&num_devices);
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
gpu_assert(device < num_devices);
|
||||
device_ = device;
|
||||
@@ -129,7 +129,7 @@ class GpuStreamDevice : public StreamInterface {
|
||||
const gpuDeviceProp_t& deviceProperties() const { return GetGpuDeviceProperties(device_); }
|
||||
virtual void* allocate(size_t num_bytes) const {
|
||||
gpuError_t err = gpuSetDevice(device_);
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
void* result;
|
||||
err = gpuMalloc(&result, num_bytes);
|
||||
@@ -139,7 +139,7 @@ class GpuStreamDevice : public StreamInterface {
|
||||
}
|
||||
virtual void deallocate(void* buffer) const {
|
||||
gpuError_t err = gpuSetDevice(device_);
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
gpu_assert(buffer != NULL);
|
||||
err = gpuFree(buffer);
|
||||
@@ -158,7 +158,7 @@ class GpuStreamDevice : public StreamInterface {
|
||||
char* scratch = static_cast<char*>(scratchpad()) + kGpuScratchSize;
|
||||
semaphore_ = reinterpret_cast<unsigned int*>(scratch);
|
||||
gpuError_t err = gpuMemsetAsync(semaphore_, 0, sizeof(unsigned int), *stream_);
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
}
|
||||
return semaphore_;
|
||||
@@ -201,7 +201,7 @@ struct GpuDevice {
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const {
|
||||
#ifndef EIGEN_GPU_COMPILE_PHASE
|
||||
gpuError_t err = gpuMemcpyAsync(dst, src, n, gpuMemcpyDeviceToDevice, stream_->stream());
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(dst);
|
||||
@@ -213,25 +213,25 @@ struct GpuDevice {
|
||||
|
||||
EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const {
|
||||
gpuError_t err = gpuMemcpyAsync(dst, src, n, gpuMemcpyHostToDevice, stream_->stream());
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE void memcpyDeviceToHost(void* dst, const void* src, size_t n) const {
|
||||
gpuError_t err = gpuMemcpyAsync(dst, src, n, gpuMemcpyDeviceToHost, stream_->stream());
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memset(void* buffer, int c, size_t n) const {
|
||||
#ifndef EIGEN_GPU_COMPILE_PHASE
|
||||
gpuError_t err = gpuMemsetAsync(buffer, c, n, stream_->stream());
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
gpu_assert(err == gpuSuccess);
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(buffer)
|
||||
EIGEN_UNUSED_VARIABLE(c)
|
||||
EIGEN_UNUSED_VARIABLE(n)
|
||||
EIGEN_UNUSED_VARIABLE(buffer);
|
||||
EIGEN_UNUSED_VARIABLE(c);
|
||||
EIGEN_UNUSED_VARIABLE(n);
|
||||
eigen_assert(false && "The default device should be used instead to generate kernel code");
|
||||
#endif
|
||||
}
|
||||
@@ -245,8 +245,7 @@ struct GpuDevice {
|
||||
char* buffer = (char*)begin;
|
||||
char* value_bytes = (char*)(&value);
|
||||
gpuError_t err;
|
||||
EIGEN_UNUSED_VARIABLE(err)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(err);
|
||||
// If all value bytes are equal, then a single memset can be much faster.
|
||||
bool use_single_memset = true;
|
||||
for (int i = 1; i < value_size; ++i) {
|
||||
@@ -265,9 +264,9 @@ struct GpuDevice {
|
||||
}
|
||||
}
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(begin)
|
||||
EIGEN_UNUSED_VARIABLE(end)
|
||||
EIGEN_UNUSED_VARIABLE(value)
|
||||
EIGEN_UNUSED_VARIABLE(begin);
|
||||
EIGEN_UNUSED_VARIABLE(end);
|
||||
EIGEN_UNUSED_VARIABLE(value);
|
||||
eigen_assert(false && "The default device should be used instead to generate kernel code");
|
||||
#endif
|
||||
}
|
||||
@@ -348,10 +347,10 @@ struct GpuDevice {
|
||||
static EIGEN_DEVICE_FUNC inline void setGpuSharedMemConfig(gpuSharedMemConfig config) {
|
||||
#ifndef EIGEN_GPU_COMPILE_PHASE
|
||||
gpuError_t status = gpuDeviceSetSharedMemConfig(config);
|
||||
EIGEN_UNUSED_VARIABLE(status)
|
||||
EIGEN_UNUSED_VARIABLE(status);
|
||||
gpu_assert(status == gpuSuccess);
|
||||
#else
|
||||
EIGEN_UNUSED_VARIABLE(config)
|
||||
EIGEN_UNUSED_VARIABLE(config);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -157,8 +157,7 @@ void testLmder1() {
|
||||
lmder_functor functor;
|
||||
LevenbergMarquardt<lmder_functor> lm(functor);
|
||||
info = lm.lmder1(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 6, 5);
|
||||
@@ -185,8 +184,7 @@ void testLmder() {
|
||||
lmder_functor functor;
|
||||
LevenbergMarquardt<lmder_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return values
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 6, 5);
|
||||
@@ -260,8 +258,7 @@ void testHybrj1() {
|
||||
hybrj_functor functor;
|
||||
HybridNonLinearSolver<hybrj_functor> solver(functor);
|
||||
info = solver.hybrj1(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(solver, 11, 1);
|
||||
@@ -289,8 +286,7 @@ void testHybrj() {
|
||||
solver.diag.setConstant(n, 1.);
|
||||
solver.useExternalScaling = true;
|
||||
info = solver.solve(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(solver, 11, 1);
|
||||
@@ -334,8 +330,7 @@ void testHybrd1() {
|
||||
hybrd_functor functor;
|
||||
HybridNonLinearSolver<hybrd_functor> solver(functor);
|
||||
info = solver.hybrd1(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
VERIFY(solver.nfev <= 20 * LM_EVAL_COUNT_TOL);
|
||||
@@ -365,8 +360,7 @@ void testHybrd() {
|
||||
solver.diag.setConstant(n, 1.);
|
||||
solver.useExternalScaling = true;
|
||||
info = solver.solveNumericalDiff(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
VERIFY(solver.nfev <= 14 * LM_EVAL_COUNT_TOL);
|
||||
@@ -430,8 +424,7 @@ void testLmstr1() {
|
||||
lmstr_functor functor;
|
||||
LevenbergMarquardt<lmstr_functor> lm(functor);
|
||||
info = lm.lmstr1(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 6, 5);
|
||||
@@ -458,8 +451,7 @@ void testLmstr() {
|
||||
lmstr_functor functor;
|
||||
LevenbergMarquardt<lmstr_functor> lm(functor);
|
||||
info = lm.minimizeOptimumStorage(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return values
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 6, 5);
|
||||
@@ -509,8 +501,7 @@ void testLmdif1() {
|
||||
lmdif_functor functor;
|
||||
DenseIndex nfev = -1; // initialize to avoid maybe-uninitialized warning
|
||||
info = LevenbergMarquardt<lmdif_functor>::lmdif1(functor, x, &nfev);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
VERIFY(nfev <= 26 * LM_EVAL_COUNT_TOL);
|
||||
@@ -539,8 +530,7 @@ void testLmdif() {
|
||||
NumericalDiff<lmdif_functor> numDiff(functor);
|
||||
LevenbergMarquardt<NumericalDiff<lmdif_functor> > lm(numDiff);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return values
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
VERIFY(lm.nfev <= 26 * LM_EVAL_COUNT_TOL);
|
||||
@@ -630,8 +620,7 @@ void testNistChwirut2(void) {
|
||||
chwirut2_functor functor;
|
||||
LevenbergMarquardt<chwirut2_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 10, 8);
|
||||
@@ -651,8 +640,7 @@ void testNistChwirut2(void) {
|
||||
lm.parameters.ftol = 1.E6 * NumTraits<double>::epsilon();
|
||||
lm.parameters.xtol = 1.E6 * NumTraits<double>::epsilon();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 7, 6);
|
||||
@@ -707,8 +695,7 @@ void testNistMisra1a(void) {
|
||||
misra1a_functor functor;
|
||||
LevenbergMarquardt<misra1a_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 19, 15);
|
||||
@@ -724,8 +711,7 @@ void testNistMisra1a(void) {
|
||||
x << 250., 0.0005;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 5, 4);
|
||||
@@ -834,8 +820,7 @@ void testNistHahn1(void) {
|
||||
hahn1_functor functor;
|
||||
LevenbergMarquardt<hahn1_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 11, 10);
|
||||
@@ -856,8 +841,7 @@ void testNistHahn1(void) {
|
||||
x << .1, -.1, .005, -.000001, -.005, .0001, -.0000001;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 11, 10);
|
||||
@@ -917,8 +901,7 @@ void testNistMisra1d(void) {
|
||||
misra1d_functor functor;
|
||||
LevenbergMarquardt<misra1d_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 3);
|
||||
LM_CHECK_N_ITERS(lm, 9, 7);
|
||||
@@ -934,8 +917,7 @@ void testNistMisra1d(void) {
|
||||
x << 450., 0.0003;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 4, 3);
|
||||
@@ -1000,8 +982,7 @@ void testNistLanczos1(void) {
|
||||
lanczos1_functor functor;
|
||||
LevenbergMarquardt<lanczos1_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 2);
|
||||
LM_CHECK_N_ITERS(lm, 79, 72);
|
||||
@@ -1023,8 +1004,7 @@ void testNistLanczos1(void) {
|
||||
x << 0.5, 0.7, 3.6, 4.2, 4., 6.3;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 2);
|
||||
LM_CHECK_N_ITERS(lm, 9, 8);
|
||||
@@ -1085,8 +1065,7 @@ void testNistRat42(void) {
|
||||
rat42_functor functor;
|
||||
LevenbergMarquardt<rat42_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 10, 8);
|
||||
@@ -1103,8 +1082,7 @@ void testNistRat42(void) {
|
||||
x << 75., 2.5, 0.07;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 6, 5);
|
||||
@@ -1162,8 +1140,7 @@ void testNistMGH10(void) {
|
||||
MGH10_functor functor;
|
||||
LevenbergMarquardt<MGH10_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 2);
|
||||
LM_CHECK_N_ITERS(lm, 284, 249);
|
||||
@@ -1180,8 +1157,7 @@ void testNistMGH10(void) {
|
||||
x << 0.02, 4000., 250.;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 3);
|
||||
LM_CHECK_N_ITERS(lm, 126, 116);
|
||||
@@ -1235,8 +1211,7 @@ void testNistBoxBOD(void) {
|
||||
lm.parameters.xtol = 1.E6 * NumTraits<double>::epsilon();
|
||||
lm.parameters.factor = 10.;
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 31, 25);
|
||||
@@ -1255,8 +1230,7 @@ void testNistBoxBOD(void) {
|
||||
lm.parameters.ftol = NumTraits<double>::epsilon();
|
||||
lm.parameters.xtol = NumTraits<double>::epsilon();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 20, 14);
|
||||
@@ -1322,8 +1296,7 @@ void testNistMGH17(void) {
|
||||
lm.parameters.xtol = NumTraits<double>::epsilon();
|
||||
lm.parameters.maxfev = 1000;
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check norm^2
|
||||
VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.4648946975E-05);
|
||||
// check x
|
||||
@@ -1344,8 +1317,7 @@ void testNistMGH17(void) {
|
||||
// do the computation
|
||||
lm.resetParameters();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 18, 15);
|
||||
@@ -1408,8 +1380,7 @@ void testNistMGH09(void) {
|
||||
LevenbergMarquardt<MGH09_functor> lm(functor);
|
||||
lm.parameters.maxfev = 1000;
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 490, 376);
|
||||
@@ -1428,8 +1399,7 @@ void testNistMGH09(void) {
|
||||
// do the computation
|
||||
lm.resetParameters();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 18, 16);
|
||||
@@ -1522,8 +1492,7 @@ void testNistBennett5(void) {
|
||||
LevenbergMarquardt<Bennett5_functor> lm(functor);
|
||||
lm.parameters.maxfev = 1000;
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 758, 744);
|
||||
@@ -1540,8 +1509,7 @@ void testNistBennett5(void) {
|
||||
// do the computation
|
||||
lm.resetParameters();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 203, 192);
|
||||
@@ -1616,8 +1584,7 @@ void testNistThurber(void) {
|
||||
lm.parameters.ftol = 1.E4 * NumTraits<double>::epsilon();
|
||||
lm.parameters.xtol = 1.E4 * NumTraits<double>::epsilon();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 39, 36);
|
||||
@@ -1641,8 +1608,7 @@ void testNistThurber(void) {
|
||||
lm.parameters.ftol = 1.E4 * NumTraits<double>::epsilon();
|
||||
lm.parameters.xtol = 1.E4 * NumTraits<double>::epsilon();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 29, 28);
|
||||
@@ -1704,8 +1670,7 @@ void testNistRat43(void) {
|
||||
lm.parameters.ftol = 1.E6 * NumTraits<double>::epsilon();
|
||||
lm.parameters.xtol = 1.E6 * NumTraits<double>::epsilon();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 27, 20);
|
||||
@@ -1726,8 +1691,7 @@ void testNistRat43(void) {
|
||||
lm.parameters.ftol = 1.E5 * NumTraits<double>::epsilon();
|
||||
lm.parameters.xtol = 1.E5 * NumTraits<double>::epsilon();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 9, 8);
|
||||
@@ -1790,8 +1754,7 @@ void testNistEckerle4(void) {
|
||||
eckerle4_functor functor;
|
||||
LevenbergMarquardt<eckerle4_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 18, 15);
|
||||
@@ -1808,8 +1771,7 @@ void testNistEckerle4(void) {
|
||||
x << 1.5, 5., 450.;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
LM_CHECK_N_ITERS(lm, 7, 6);
|
||||
|
||||
@@ -68,8 +68,7 @@ void testLmder1() {
|
||||
lmder_functor functor;
|
||||
LevenbergMarquardt<lmder_functor> lm(functor);
|
||||
info = lm.lmder1(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
// check return value
|
||||
EIGEN_UNUSED_VARIABLE(info); // check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 6);
|
||||
// VERIFY_IS_EQUAL(lm.njev(), 5);
|
||||
@@ -96,8 +95,7 @@ void testLmder() {
|
||||
lmder_functor functor;
|
||||
LevenbergMarquardt<lmder_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return values
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 6);
|
||||
@@ -164,8 +162,7 @@ void testLmdif1() {
|
||||
lmdif_functor functor;
|
||||
DenseIndex nfev;
|
||||
info = LevenbergMarquardt<lmdif_functor>::lmdif1(functor, x, &nfev);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(nfev, 26);
|
||||
@@ -194,8 +191,7 @@ void testLmdif() {
|
||||
NumericalDiff<lmdif_functor> numDiff(functor);
|
||||
LevenbergMarquardt<NumericalDiff<lmdif_functor> > lm(numDiff);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return values
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 26);
|
||||
@@ -285,8 +281,7 @@ void testNistChwirut2(void) {
|
||||
chwirut2_functor functor;
|
||||
LevenbergMarquardt<chwirut2_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 10);
|
||||
@@ -307,8 +302,7 @@ void testNistChwirut2(void) {
|
||||
lm.setFtol(1.E6 * NumTraits<double>::epsilon());
|
||||
lm.setXtol(1.E6 * NumTraits<double>::epsilon());
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 7);
|
||||
@@ -364,8 +358,7 @@ void testNistMisra1a(void) {
|
||||
misra1a_functor functor;
|
||||
LevenbergMarquardt<misra1a_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 19);
|
||||
@@ -382,8 +375,7 @@ void testNistMisra1a(void) {
|
||||
x << 250., 0.0005;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 5);
|
||||
@@ -493,8 +485,7 @@ void testNistHahn1(void) {
|
||||
hahn1_functor functor;
|
||||
LevenbergMarquardt<hahn1_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 11);
|
||||
@@ -516,8 +507,7 @@ void testNistHahn1(void) {
|
||||
x << .1, -.1, .005, -.000001, -.005, .0001, -.0000001;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 11);
|
||||
@@ -578,8 +568,7 @@ void testNistMisra1d(void) {
|
||||
misra1d_functor functor;
|
||||
LevenbergMarquardt<misra1d_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 9);
|
||||
@@ -596,8 +585,7 @@ void testNistMisra1d(void) {
|
||||
x << 450., 0.0003;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 4);
|
||||
@@ -663,8 +651,7 @@ void testNistLanczos1(void) {
|
||||
lanczos1_functor functor;
|
||||
LevenbergMarquardt<lanczos1_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeErrorTooSmall);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 79);
|
||||
@@ -685,8 +672,7 @@ void testNistLanczos1(void) {
|
||||
x << 0.5, 0.7, 3.6, 4.2, 4., 6.3;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeErrorTooSmall);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 9);
|
||||
@@ -748,8 +734,7 @@ void testNistRat42(void) {
|
||||
rat42_functor functor;
|
||||
LevenbergMarquardt<rat42_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 10);
|
||||
@@ -767,8 +752,7 @@ void testNistRat42(void) {
|
||||
x << 75., 2.5, 0.07;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 6);
|
||||
@@ -827,8 +811,7 @@ void testNistMGH10(void) {
|
||||
MGH10_functor functor;
|
||||
LevenbergMarquardt<MGH10_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
// ++g_test_level;
|
||||
EIGEN_UNUSED_VARIABLE(info); // ++g_test_level;
|
||||
// VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);
|
||||
// --g_test_level;
|
||||
// was: VERIFY_IS_EQUAL(info, 1);
|
||||
@@ -855,8 +838,7 @@ void testNistMGH10(void) {
|
||||
x << 0.02, 4000., 250.;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
// ++g_test_level;
|
||||
EIGEN_UNUSED_VARIABLE(info); // ++g_test_level;
|
||||
// VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);
|
||||
// // was: VERIFY_IS_EQUAL(info, 1);
|
||||
// --g_test_level;
|
||||
@@ -919,8 +901,7 @@ void testNistBoxBOD(void) {
|
||||
lm.setXtol(1.E6 * NumTraits<double>::epsilon());
|
||||
lm.setFactor(10);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check norm^2
|
||||
VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.1680088766E+03);
|
||||
// check x
|
||||
@@ -941,8 +922,7 @@ void testNistBoxBOD(void) {
|
||||
lm.setFtol(NumTraits<double>::epsilon());
|
||||
lm.setXtol(NumTraits<double>::epsilon());
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// ++g_test_level;
|
||||
@@ -1013,8 +993,7 @@ void testNistMGH17(void) {
|
||||
lm.setXtol(NumTraits<double>::epsilon());
|
||||
lm.setMaxfev(1000);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check norm^2
|
||||
VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.4648946975E-05);
|
||||
// check x
|
||||
@@ -1036,8 +1015,7 @@ void testNistMGH17(void) {
|
||||
// do the computation
|
||||
lm.resetParameters();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 18);
|
||||
@@ -1101,8 +1079,7 @@ void testNistMGH09(void) {
|
||||
LevenbergMarquardt<MGH09_functor> lm(functor);
|
||||
lm.setMaxfev(1000);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check norm^2
|
||||
VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 3.0750560385E-04);
|
||||
// check x
|
||||
@@ -1122,8 +1099,7 @@ void testNistMGH09(void) {
|
||||
// do the computation
|
||||
lm.resetParameters();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 18);
|
||||
@@ -1217,8 +1193,7 @@ void testNistBennett5(void) {
|
||||
LevenbergMarquardt<Bennett5_functor> lm(functor);
|
||||
lm.setMaxfev(1000);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 758);
|
||||
@@ -1236,8 +1211,7 @@ void testNistBennett5(void) {
|
||||
// do the computation
|
||||
lm.resetParameters();
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 203);
|
||||
@@ -1313,8 +1287,7 @@ void testNistThurber(void) {
|
||||
lm.setFtol(1.E4 * NumTraits<double>::epsilon());
|
||||
lm.setXtol(1.E4 * NumTraits<double>::epsilon());
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 39);
|
||||
@@ -1339,8 +1312,7 @@ void testNistThurber(void) {
|
||||
lm.setFtol(1.E4 * NumTraits<double>::epsilon());
|
||||
lm.setXtol(1.E4 * NumTraits<double>::epsilon());
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 29);
|
||||
@@ -1403,8 +1375,7 @@ void testNistRat43(void) {
|
||||
lm.setFtol(1.E6 * NumTraits<double>::epsilon());
|
||||
lm.setXtol(1.E6 * NumTraits<double>::epsilon());
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 27);
|
||||
@@ -1426,8 +1397,7 @@ void testNistRat43(void) {
|
||||
lm.setFtol(1.E5 * NumTraits<double>::epsilon());
|
||||
lm.setXtol(1.E5 * NumTraits<double>::epsilon());
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 9);
|
||||
@@ -1491,8 +1461,7 @@ void testNistEckerle4(void) {
|
||||
eckerle4_functor functor;
|
||||
LevenbergMarquardt<eckerle4_functor> lm(functor);
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 18);
|
||||
@@ -1510,8 +1479,7 @@ void testNistEckerle4(void) {
|
||||
x << 1.5, 5., 450.;
|
||||
// do the computation
|
||||
info = lm.minimize(x);
|
||||
EIGEN_UNUSED_VARIABLE(info)
|
||||
|
||||
EIGEN_UNUSED_VARIABLE(info);
|
||||
// check return value
|
||||
// VERIFY_IS_EQUAL(info, 1);
|
||||
// VERIFY_IS_EQUAL(lm.nfev(), 7);
|
||||
|
||||
Reference in New Issue
Block a user