mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -14,10 +14,7 @@
|
||||
using Eigen::Tensor;
|
||||
using Eigen::TensorMap;
|
||||
|
||||
|
||||
|
||||
static void test_additions()
|
||||
{
|
||||
static void test_additions() {
|
||||
Tensor<std::complex<float>, 1> data1(3);
|
||||
Tensor<std::complex<float>, 1> data2(3);
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
@@ -27,13 +24,11 @@ static void test_additions()
|
||||
|
||||
Tensor<std::complex<float>, 1> sum = data1 + data2;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
VERIFY_IS_EQUAL(sum(i), std::complex<float>(2*i, 6*i));
|
||||
VERIFY_IS_EQUAL(sum(i), std::complex<float>(2 * i, 6 * i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void test_abs()
|
||||
{
|
||||
static void test_abs() {
|
||||
Tensor<std::complex<float>, 1> data1(3);
|
||||
Tensor<std::complex<double>, 1> data2(3);
|
||||
data1.setRandom();
|
||||
@@ -47,8 +42,7 @@ static void test_abs()
|
||||
}
|
||||
}
|
||||
|
||||
static void test_arg()
|
||||
{
|
||||
static void test_arg() {
|
||||
Tensor<std::complex<float>, 1> data1(3);
|
||||
Tensor<std::complex<double>, 1> data2(3);
|
||||
data1.setRandom();
|
||||
@@ -62,8 +56,7 @@ static void test_arg()
|
||||
}
|
||||
}
|
||||
|
||||
static void test_conjugate()
|
||||
{
|
||||
static void test_conjugate() {
|
||||
Tensor<std::complex<float>, 1> data1(3);
|
||||
Tensor<std::complex<double>, 1> data2(3);
|
||||
Tensor<int, 1> data3(3);
|
||||
@@ -81,8 +74,7 @@ static void test_conjugate()
|
||||
}
|
||||
}
|
||||
|
||||
static void test_contractions()
|
||||
{
|
||||
static void test_contractions() {
|
||||
Tensor<std::complex<float>, 4> t_left(30, 50, 8, 31);
|
||||
Tensor<std::complex<float>, 5> t_right(8, 31, 7, 20, 10);
|
||||
Tensor<std::complex<float>, 5> t_result(30, 50, 7, 20, 10);
|
||||
@@ -107,9 +99,7 @@ static void test_contractions()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_of_complex)
|
||||
{
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_of_complex) {
|
||||
CALL_SUBTEST(test_additions());
|
||||
CALL_SUBTEST(test_abs());
|
||||
CALL_SUBTEST(test_arg());
|
||||
|
||||
Reference in New Issue
Block a user