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