Clang-format tests, examples, libraries, benchmarks, etc.

This commit is contained in:
Antonio Sánchez
2023-12-05 21:22:55 +00:00
committed by Rasmus Munk Larsen
parent 3252ecc7a4
commit 46e9cdb7fe
876 changed files with 33453 additions and 37795 deletions

View File

@@ -11,18 +11,22 @@
#include <Eigen/CXX11/Tensor>
static void test_simple()
{
static void test_simple() {
Tensor<float, 1, ColMajor> vec1(6);
Tensor<float, 1, ColMajor, int> vec2(6);
vec1(0) = 4.0; vec2(0) = 0.0;
vec1(1) = 8.0; vec2(1) = 1.0;
vec1(2) = 15.0; vec2(2) = 2.0;
vec1(3) = 16.0; vec2(3) = 3.0;
vec1(4) = 23.0; vec2(4) = 4.0;
vec1(5) = 42.0; vec2(5) = 5.0;
vec1(0) = 4.0;
vec2(0) = 0.0;
vec1(1) = 8.0;
vec2(1) = 1.0;
vec1(2) = 15.0;
vec2(2) = 2.0;
vec1(3) = 16.0;
vec2(3) = 3.0;
vec1(4) = 23.0;
vec2(4) = 4.0;
vec1(5) = 42.0;
vec2(5) = 5.0;
float data3[6];
TensorMap<Tensor<float, 1, ColMajor>> vec3(data3, 6);
@@ -46,8 +50,4 @@ static void test_simple()
VERIFY_IS_APPROX(vec4(5), 5.0f * 5.0f);
}
EIGEN_DECLARE_TEST(cxx11_tensor_mixed_indices)
{
CALL_SUBTEST(test_simple());
}
EIGEN_DECLARE_TEST(cxx11_tensor_mixed_indices) { CALL_SUBTEST(test_simple()); }