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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user