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

@@ -4,9 +4,8 @@
using Eigen::Tensor;
static void test_single_voxel_patch()
{
Tensor<float, 5> tensor(4,2,3,5,7);
static void test_single_voxel_patch() {
Tensor<float, 5> tensor(4, 2, 3, 5, 7);
tensor.setRandom();
Tensor<float, 5, RowMajor> tensor_row_major = tensor.swap_layout();
@@ -35,9 +34,7 @@ static void test_single_voxel_patch()
}
}
static void test_entire_volume_patch()
{
static void test_entire_volume_patch() {
const int depth = 4;
const int patch_z = 2;
const int patch_y = 3;
@@ -88,8 +85,7 @@ static void test_entire_volume_patch()
const int eff_z = z - forward_pad_z + pz;
const int eff_y = y - forward_pad_y + py;
const int eff_x = x - forward_pad_x + px;
if (eff_z >= 0 && eff_y >= 0 && eff_x >= 0 &&
eff_z < patch_z && eff_y < patch_y && eff_x < patch_x) {
if (eff_z >= 0 && eff_y >= 0 && eff_x >= 0 && eff_z < patch_z && eff_y < patch_y && eff_x < patch_x) {
expected = tensor(d, eff_z, eff_y, eff_x, b);
expected_row_major = tensor_row_major(b, eff_x, eff_y, eff_z, d);
}
@@ -105,8 +101,7 @@ static void test_entire_volume_patch()
}
}
EIGEN_DECLARE_TEST(cxx11_tensor_volume_patch)
{
EIGEN_DECLARE_TEST(cxx11_tensor_volume_patch) {
CALL_SUBTEST(test_single_voxel_patch());
CALL_SUBTEST(test_entire_volume_patch());
}