Skip to content

Commit a0a5ef0

Browse files
committed
fix clang format
1 parent afa6fe1 commit a0a5ef0

10 files changed

Lines changed: 24 additions & 47 deletions

File tree

tasks-1/example/all/include/ops_all.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TestTaskALL : public ppc::core::Task<InType, OutType> {
2020
bool PreProcessingImpl() override;
2121
bool RunImpl() override;
2222
bool PostProcessingImpl() override;
23+
2324
private:
2425
int rc_size_{};
2526
};

tasks-1/example/all/src/ops_all.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ void nesterov_a_test_task_all::MatMulTBB(const InType &in_vec, int rc_size, OutT
2727
MatMul(in_vec, rc_size, out_vec);
2828
}
2929

30-
nesterov_a_test_task_all::TestTaskALL::TestTaskALL(const InType &in) {
31-
GetInput() = in;
32-
}
30+
nesterov_a_test_task_all::TestTaskALL::TestTaskALL(const InType &in) { GetInput() = in; }
3331

3432
bool nesterov_a_test_task_all::TestTaskALL::ValidationImpl() {
3533
auto sqrt_size = static_cast<int>(std::sqrt(GetInput().size()));

tasks-1/example/mpi/include/ops_mpi.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TestTaskMPI : public ppc::core::Task<InType, OutType> {
2020
bool PreProcessingImpl() override;
2121
bool RunImpl() override;
2222
bool PostProcessingImpl() override;
23+
2324
private:
2425
int rc_size_{};
2526

tasks-1/example/mpi/src/ops_mpi.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ void nesterov_a_test_task_mpi::MultiplyColumnMajor(const InType &in, OutType &ou
2626
}
2727
}
2828

29-
nesterov_a_test_task_mpi::TestTaskMPI::TestTaskMPI(const InType &in) {
30-
GetInput() = in;
31-
}
29+
nesterov_a_test_task_mpi::TestTaskMPI::TestTaskMPI(const InType &in) { GetInput() = in; }
3230

3331
bool nesterov_a_test_task_mpi::TestTaskMPI::ValidationImpl() {
3432
auto sqrt_size = static_cast<int>(std::sqrt(GetInput().size()));

tasks-1/example/omp/src/ops_omp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
#include <cstddef>
55
#include <vector>
66

7-
nesterov_a_test_task_omp::TestTaskOMP::TestTaskOMP(const InType& in) {
8-
GetInput() = in;
9-
}
7+
nesterov_a_test_task_omp::TestTaskOMP::TestTaskOMP(const InType& in) { GetInput() = in; }
108

119
bool nesterov_a_test_task_omp::TestTaskOMP::ValidationImpl() {
1210
auto sqrt_size = static_cast<int>(std::sqrt(GetInput().size()));

tasks-1/example/seq/src/ops_seq.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
#include <cstddef>
55
#include <vector>
66

7-
nesterov_a_test_task_seq::TestTaskSEQ::TestTaskSEQ(const InType& in) {
8-
GetInput() = in;
9-
}
7+
nesterov_a_test_task_seq::TestTaskSEQ::TestTaskSEQ(const InType& in) { GetInput() = in; }
108

119
bool nesterov_a_test_task_seq::TestTaskSEQ::ValidationImpl() {
1210
auto sqrt_size = static_cast<int>(std::sqrt(GetInput().size()));

tasks-1/example/stl/src/ops_stl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ void MatMul(const std::vector<int> &in_vec, int rc_size, std::vector<int> &out_v
2121
}
2222
} // namespace
2323

24-
nesterov_a_test_task_stl::TestTaskSTL::TestTaskSTL(const InType& in) {
25-
GetInput() = in;
26-
}
24+
nesterov_a_test_task_stl::TestTaskSTL::TestTaskSTL(const InType &in) { GetInput() = in; }
2725

2826
bool nesterov_a_test_task_stl::TestTaskSTL::ValidationImpl() {
2927
auto sqrt_size = static_cast<int>(std::sqrt(GetInput().size()));

tasks-1/example/tbb/src/ops_tbb.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ void MatMul(const std::vector<int> &in_vec, int rc_size, std::vector<int> &out_v
2222
}
2323
} // namespace
2424

25-
nesterov_a_test_task_tbb::TestTaskTBB::TestTaskTBB(const InType& in) {
26-
GetInput() = in;
27-
}
25+
nesterov_a_test_task_tbb::TestTaskTBB::TestTaskTBB(const InType &in) { GetInput() = in; }
2826

2927
bool nesterov_a_test_task_tbb::TestTaskTBB::ValidationImpl() {
3028
auto sqrt_size = static_cast<int>(std::sqrt(GetInput().size()));

tasks-1/example/tests/func_tests/main.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@
55
#include <string>
66
#include <vector>
77

8+
#include "core/util/include/util.hpp"
89
#include "example/all/include/ops_all.hpp"
910
#include "example/mpi/include/ops_mpi.hpp"
1011
#include "example/omp/include/ops_omp.hpp"
1112
#include "example/seq/include/ops_seq.hpp"
1213
#include "example/stl/include/ops_stl.hpp"
1314
#include "example/tbb/include/ops_tbb.hpp"
1415

15-
#include "core/util/include/util.hpp"
16-
1716
using InType = std::vector<int>;
1817
using OutType = std::vector<int>;
1918

2019
using TestParam = std::tuple<int, std::function<ppc::core::TaskPtr<InType, OutType>(InType)>>;
2120

22-
class NesterovARunFuncTests: public ::testing::TestWithParam<TestParam> {
21+
class NesterovARunFuncTests : public ::testing::TestWithParam<TestParam> {
2322
protected:
2423
void SetUp() override {
2524
// Read image
@@ -52,13 +51,10 @@ class NesterovARunFuncTests: public ::testing::TestWithParam<TestParam> {
5251
std::vector<uint8_t> img;
5352
};
5453

55-
TEST_P(NesterovARunFuncTests, MatmulFromPic) {
56-
ExecuteTest();
57-
}
54+
TEST_P(NesterovARunFuncTests, MatmulFromPic) { ExecuteTest(); }
5855

5956
#define ADD_TASK(TASK) \
60-
std::make_tuple(5, ppc::core::TaskGetter<TASK, InType>), \
61-
std::make_tuple(10, ppc::core::TaskGetter<TASK, InType>)
57+
std::make_tuple(5, ppc::core::TaskGetter<TASK, InType>), std::make_tuple(10, ppc::core::TaskGetter<TASK, InType>)
6258

6359
INSTANTIATE_TEST_SUITE_P_NOLINT(PicMatrixTests, NesterovARunFuncTests,
6460
::testing::Values(ADD_TASK(nesterov_a_test_task_all::TestTaskALL),

tasks-1/example/tests/perf_tests/main.cpp

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
#include <memory>
66
#include <vector>
77

8+
#include "core/perf/include/perf.hpp"
9+
#include "core/util/include/test_util.hpp"
10+
#include "core/util/include/util.hpp"
811
#include "example/all/include/ops_all.hpp"
912
#include "example/mpi/include/ops_mpi.hpp"
1013
#include "example/omp/include/ops_omp.hpp"
1114
#include "example/seq/include/ops_seq.hpp"
1215
#include "example/stl/include/ops_stl.hpp"
1316
#include "example/tbb/include/ops_tbb.hpp"
1417

15-
#include "core/perf/include/perf.hpp"
16-
#include "core/util/include/util.hpp"
17-
#include "core/util/include/test_util.hpp"
18-
1918
using InType = std::vector<int>;
2019
using OutType = std::vector<int>;
2120

@@ -39,27 +38,19 @@ class ExampleRunPerfTest : public ppc::util::BaseRunPerfTests<InType, OutType> {
3938
};
4039
}
4140

42-
bool CheckTestOutputData(OutType& output_data) final {
43-
return input_data == output_data;
44-
}
41+
bool CheckTestOutputData(OutType& output_data) final { return input_data == output_data; }
4542

46-
InType GetTestInputData() final {
47-
return input_data;
48-
}
43+
InType GetTestInputData() final { return input_data; }
4944
};
5045

5146
TEST_P(ExampleRunPerfTest, RunModes) {
5247
ExecuteTest(std::get<0>(GetParam()), std::get<1>(GetParam()), std::get<2>(GetParam()));
5348
}
5449

55-
INSTANTIATE_TEST_SUITE_P_NOLINT(
56-
RunModeTests,
57-
ExampleRunPerfTest,
58-
::testing::Values(
59-
ADD_MODES(nesterov_a_test_task_all::TestTaskALL, InType),
60-
ADD_MODES(nesterov_a_test_task_mpi::TestTaskMPI, InType),
61-
ADD_MODES(nesterov_a_test_task_omp::TestTaskOMP, InType),
62-
ADD_MODES(nesterov_a_test_task_seq::TestTaskSEQ, InType),
63-
ADD_MODES(nesterov_a_test_task_stl::TestTaskSTL, InType),
64-
ADD_MODES(nesterov_a_test_task_tbb::TestTaskTBB, InType))
65-
);
50+
INSTANTIATE_TEST_SUITE_P_NOLINT(RunModeTests, ExampleRunPerfTest,
51+
::testing::Values(ADD_MODES(nesterov_a_test_task_all::TestTaskALL, InType),
52+
ADD_MODES(nesterov_a_test_task_mpi::TestTaskMPI, InType),
53+
ADD_MODES(nesterov_a_test_task_omp::TestTaskOMP, InType),
54+
ADD_MODES(nesterov_a_test_task_seq::TestTaskSEQ, InType),
55+
ADD_MODES(nesterov_a_test_task_stl::TestTaskSTL, InType),
56+
ADD_MODES(nesterov_a_test_task_tbb::TestTaskTBB, InType)));

0 commit comments

Comments
 (0)