Skip to content

Commit a1363e8

Browse files
committed
[CI] Fix rest of the warnings reported by clang-tidy tool
1 parent 6902b2a commit a1363e8

File tree

10 files changed

+47
-47
lines changed

10 files changed

+47
-47
lines changed

modules/core/perf/func_tests/perf_tests.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ TEST(perf_tests, check_perf_pipeline) {
2929

3030
// Create Perf analyzer
3131
ppc::core::Perf perf_analyzer(test_task);
32-
perf_analyzer.pipeline_run(perf_attr, perf_results);
32+
perf_analyzer.PipelineRun(perf_attr, perf_results);
3333

3434
// Get perf statistic
35-
ppc::core::Perf::print_perf_statistic(perf_results);
35+
ppc::core::Perf::PrintPerfStatistic(perf_results);
3636
ASSERT_LE(perf_results->time_sec, ppc::core::PerfResults::MAX_TIME);
3737
EXPECT_EQ(out[0], in.size());
3838
}
@@ -61,10 +61,10 @@ TEST(perf_tests, check_perf_pipeline_float) {
6161

6262
// Create Perf analyzer
6363
ppc::core::Perf perf_analyzer(test_task);
64-
perf_analyzer.pipeline_run(perf_attr, perf_results);
64+
perf_analyzer.PipelineRun(perf_attr, perf_results);
6565

6666
// Get perf statistic
67-
ppc::core::Perf::print_perf_statistic(perf_results);
67+
ppc::core::Perf::PrintPerfStatistic(perf_results);
6868
ASSERT_LE(perf_results->time_sec, ppc::core::PerfResults::MAX_TIME);
6969
EXPECT_EQ(out[0], in.size());
7070
}
@@ -98,10 +98,10 @@ TEST(perf_tests, check_perf_pipeline_uint8_t_slow_test) {
9898

9999
// Create Perf analyzer
100100
ppc::core::Perf perf_analyzer(test_task);
101-
perf_analyzer.pipeline_run(perf_attr, perf_results);
101+
perf_analyzer.PipelineRun(perf_attr, perf_results);
102102

103103
// Get perf statistic
104-
ASSERT_ANY_THROW(ppc::core::Perf::print_perf_statistic(perf_results));
104+
ASSERT_ANY_THROW(ppc::core::Perf::PrintPerfStatistic(perf_results));
105105
ASSERT_GE(perf_results->time_sec, ppc::core::PerfResults::MAX_TIME);
106106
EXPECT_EQ(out[0], in.size());
107107
}
@@ -130,11 +130,11 @@ TEST(perf_tests, check_perf_task) {
130130

131131
// Create Perf analyzer
132132
ppc::core::Perf perf_analyzer(test_task);
133-
perf_analyzer.task_run(perf_attr, perf_results);
133+
perf_analyzer.TaskRun(perf_attr, perf_results);
134134

135135
// Get perf statistic
136136
perf_results->type_of_running = ppc::core::PerfResults::NONE;
137-
ppc::core::Perf::print_perf_statistic(perf_results);
137+
ppc::core::Perf::PrintPerfStatistic(perf_results);
138138
ASSERT_LE(perf_results->time_sec, ppc::core::PerfResults::MAX_TIME);
139139
EXPECT_EQ(out[0], in.size());
140140
}
@@ -163,11 +163,11 @@ TEST(perf_tests, check_perf_task_float) {
163163

164164
// Create Perf analyzer
165165
ppc::core::Perf perf_analyzer(test_task);
166-
perf_analyzer.task_run(perf_attr, perf_results);
166+
perf_analyzer.TaskRun(perf_attr, perf_results);
167167

168168
// Get perf statistic
169169
perf_results->type_of_running = ppc::core::PerfResults::PIPELINE;
170-
ppc::core::Perf::print_perf_statistic(perf_results);
170+
ppc::core::Perf::PrintPerfStatistic(perf_results);
171171
ASSERT_LE(perf_results->time_sec, ppc::core::PerfResults::MAX_TIME);
172172
EXPECT_EQ(out[0], in.size());
173173
}

modules/core/perf/include/perf.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ struct PerfResults {
2727
class Perf {
2828
public:
2929
// Init performance analysis with initialized task and initialized data
30-
explicit Perf(const std::shared_ptr<Task> &task_);
30+
explicit Perf(const std::shared_ptr<Task> &task);
3131
// Set task with initialized task and initialized data for performance
3232
// analysis c
33-
void set_task(const std::shared_ptr<Task> &task_);
33+
void SetTask(const std::shared_ptr<Task> &task);
3434
// Check performance of full task's pipeline: pre_processing() ->
3535
// validation() -> run() -> post_processing()
36-
void pipeline_run(const std::shared_ptr<PerfAttr>& perf_attr,
36+
void PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
3737
const std::shared_ptr<ppc::core::PerfResults>& perf_results);
3838
// Check performance of task's run() function
39-
void task_run(const std::shared_ptr<PerfAttr>& perf_attr, const std::shared_ptr<ppc::core::PerfResults>& perf_results);
39+
void TaskRun(const std::shared_ptr<PerfAttr>& perf_attr, const std::shared_ptr<ppc::core::PerfResults>& perf_results);
4040
// Pint results for automation checkers
41-
static void print_perf_statistic(const std::shared_ptr<PerfResults>& perf_results);
41+
static void PrintPerfStatistic(const std::shared_ptr<PerfResults>& perf_results);
4242

4343
private:
4444
std::shared_ptr<Task> task;
45-
static void common_run(const std::shared_ptr<PerfAttr>& perf_attr, const std::function<void()>& pipeline,
45+
static void CommonRun(const std::shared_ptr<PerfAttr>& perf_attr, const std::function<void()>& pipeline,
4646
const std::shared_ptr<ppc::core::PerfResults>& perf_results);
4747
};
4848

modules/core/perf/src/perf.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
#include <sstream>
88
#include <utility>
99

10-
ppc::core::Perf::Perf(const std::shared_ptr<Task> &task) { set_task(task); }
10+
ppc::core::Perf::Perf(const std::shared_ptr<Task> &task) { SetTask(task); }
1111

12-
void ppc::core::Perf::set_task(const std::shared_ptr<Task> &task) {
12+
void ppc::core::Perf::SetTask(const std::shared_ptr<Task> &task) {
1313
task->get_data()->state_of_testing = TaskData::StateOfTesting::PERF;
1414
this->task = task;
1515
}
1616

17-
void ppc::core::Perf::pipeline_run(const std::shared_ptr<PerfAttr>& perf_attr,
17+
void ppc::core::Perf::PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
1818
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
1919
perf_results->type_of_running = PerfResults::TypeOfRunning::PIPELINE;
2020

21-
common_run(
21+
CommonRun(
2222
perf_attr,
2323
[&]() {
2424
task->validation();
@@ -29,13 +29,13 @@ void ppc::core::Perf::pipeline_run(const std::shared_ptr<PerfAttr>& perf_attr,
2929
perf_results);
3030
}
3131

32-
void ppc::core::Perf::task_run(const std::shared_ptr<PerfAttr>& perf_attr,
32+
void ppc::core::Perf::TaskRun(const std::shared_ptr<PerfAttr>& perf_attr,
3333
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
3434
perf_results->type_of_running = PerfResults::TypeOfRunning::TASK_RUN;
3535

3636
task->validation();
3737
task->pre_processing();
38-
common_run(perf_attr, [&]() { task->run(); }, perf_results);
38+
CommonRun(perf_attr, [&]() { task->run(); }, perf_results);
3939
task->post_processing();
4040

4141
task->validation();
@@ -44,7 +44,7 @@ void ppc::core::Perf::task_run(const std::shared_ptr<PerfAttr>& perf_attr,
4444
task->post_processing();
4545
}
4646

47-
void ppc::core::Perf::common_run(const std::shared_ptr<PerfAttr>& perf_attr, const std::function<void()>& pipeline,
47+
void ppc::core::Perf::CommonRun(const std::shared_ptr<PerfAttr>& perf_attr, const std::function<void()>& pipeline,
4848
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
4949
auto begin = perf_attr->current_timer();
5050
for (uint64_t i = 0; i < perf_attr->num_running; i++) {
@@ -54,7 +54,7 @@ void ppc::core::Perf::common_run(const std::shared_ptr<PerfAttr>& perf_attr, con
5454
perf_results->time_sec = end - begin;
5555
}
5656

57-
void ppc::core::Perf::print_perf_statistic(const std::shared_ptr<PerfResults>& perf_results) {
57+
void ppc::core::Perf::PrintPerfStatistic(const std::shared_ptr<PerfResults>& perf_results) {
5858
std::string relative_path(::testing::UnitTest::GetInstance()->current_test_info()->file());
5959
std::string ppc_regex_template("parallel_programming_course");
6060
std::string perf_regex_template("perf_tests");

modules/core/task/include/task.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Task {
2727
explicit Task(TaskDataPtr task_data);
2828

2929
// set input and output data
30-
void set_data(TaskDataPtr task_data);
30+
void SetData(TaskDataPtr task_data);
3131

3232
// validation of data and validation of task attributes before running
3333
virtual bool validation();

modules/core/task/src/task.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
#include <stdexcept>
66
#include <utility>
77

8-
void ppc::core::Task::set_data(TaskDataPtr task_data) {
8+
void ppc::core::Task::SetData(TaskDataPtr task_data) {
99
task_data->state_of_testing = TaskData::StateOfTesting::FUNC;
1010
functions_order.clear();
1111
taskData = std::move(task_data);
1212
}
1313

1414
ppc::core::TaskDataPtr ppc::core::Task::get_data() const { return taskData; }
1515

16-
ppc::core::Task::Task(TaskDataPtr task_data) { set_data(std::move(task_data)); }
16+
ppc::core::Task::Task(TaskDataPtr task_data) { SetData(std::move(task_data)); }
1717

1818
bool ppc::core::Task::validation() {
1919
internal_order_test();

tasks/mpi/example/perf_tests/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ TEST(mpi_example_perf_test, test_pipeline_run) {
3939

4040
// Create Perf analyzer
4141
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_mpi_task_parallel);
42-
perf_analyzer->pipeline_run(perf_attr, perf_results);
42+
perf_analyzer->PipelineRun(perf_attr, perf_results);
4343
if (world.rank() == 0) {
44-
ppc::core::Perf::print_perf_statistic(perf_results);
44+
ppc::core::Perf::PrintPerfStatistic(perf_results);
4545
ASSERT_EQ(count_size_vector, global_sum[0]);
4646
}
4747
}
@@ -79,9 +79,9 @@ TEST(mpi_example_perf_test, test_task_run) {
7979

8080
// Create Perf analyzer
8181
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_mpi_task_parallel);
82-
perf_analyzer->task_run(perf_attr, perf_results);
82+
perf_analyzer->TaskRun(perf_attr, perf_results);
8383
if (world.rank() == 0) {
84-
ppc::core::Perf::print_perf_statistic(perf_results);
84+
ppc::core::Perf::PrintPerfStatistic(perf_results);
8585
ASSERT_EQ(count_size_vector, global_sum[0]);
8686
}
8787
}

tasks/omp/example/perf_tests/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ TEST(openmp_example_perf_test, test_pipeline_run) {
3333

3434
// Create Perf analyzer
3535
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_omp);
36-
perf_analyzer->pipeline_run(perf_attr, perf_results);
37-
ppc::core::Perf::print_perf_statistic(perf_results);
36+
perf_analyzer->PipelineRun(perf_attr, perf_results);
37+
ppc::core::Perf::PrintPerfStatistic(perf_results);
3838
ASSERT_EQ(count + 1, out[0]);
3939
}
4040

@@ -65,7 +65,7 @@ TEST(openmp_example_perf_test, test_task_run) {
6565

6666
// Create Perf analyzer
6767
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_omp);
68-
perf_analyzer->task_run(perf_attr, perf_results);
69-
ppc::core::Perf::print_perf_statistic(perf_results);
68+
perf_analyzer->TaskRun(perf_attr, perf_results);
69+
ppc::core::Perf::PrintPerfStatistic(perf_results);
7070
ASSERT_EQ(count + 1, out[0]);
7171
}

tasks/seq/example/perf_tests/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ TEST(sequential_example_perf_test, test_pipeline_run) {
3737

3838
// Create Perf analyzer
3939
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_sequential);
40-
perf_analyzer->pipeline_run(perf_attr, perf_results);
41-
ppc::core::Perf::print_perf_statistic(perf_results);
40+
perf_analyzer->PipelineRun(perf_attr, perf_results);
41+
ppc::core::Perf::PrintPerfStatistic(perf_results);
4242
ASSERT_EQ(count, out[0]);
4343
}
4444

@@ -74,7 +74,7 @@ TEST(sequential_example_perf_test, test_task_run) {
7474

7575
// Create Perf analyzer
7676
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_sequential);
77-
perf_analyzer->task_run(perf_attr, perf_results);
78-
ppc::core::Perf::print_perf_statistic(perf_results);
77+
perf_analyzer->TaskRun(perf_attr, perf_results);
78+
ppc::core::Perf::PrintPerfStatistic(perf_results);
7979
ASSERT_EQ(count, out[0]);
8080
}

tasks/stl/example/perf_tests/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ TEST(stl_example_perf_test, test_pipeline_run) {
3737

3838
// Create Perf analyzer
3939
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_stl);
40-
perf_analyzer->pipeline_run(perf_attr, perf_results);
41-
ppc::core::Perf::print_perf_statistic(perf_results);
40+
perf_analyzer->PipelineRun(perf_attr, perf_results);
41+
ppc::core::Perf::PrintPerfStatistic(perf_results);
4242
ASSERT_EQ(count, out[0]);
4343
}
4444

@@ -74,7 +74,7 @@ TEST(stl_example_perf_test, test_task_run) {
7474

7575
// Create Perf analyzer
7676
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_stl);
77-
perf_analyzer->task_run(perf_attr, perf_results);
78-
ppc::core::Perf::print_perf_statistic(perf_results);
77+
perf_analyzer->TaskRun(perf_attr, perf_results);
78+
ppc::core::Perf::PrintPerfStatistic(perf_results);
7979
ASSERT_EQ(count, out[0]);
8080
}

tasks/tbb/example/perf_tests/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ TEST(tbb_example_perf_test, test_pipeline_run) {
3434

3535
// Create Perf analyzer
3636
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_tbb);
37-
perf_analyzer->pipeline_run(perf_attr, perf_results);
38-
ppc::core::Perf::print_perf_statistic(perf_results);
37+
perf_analyzer->PipelineRun(perf_attr, perf_results);
38+
ppc::core::Perf::PrintPerfStatistic(perf_results);
3939
ASSERT_EQ(count + 1, out[0]);
4040
}
4141

@@ -67,7 +67,7 @@ TEST(tbb_example_perf_test, test_task_run) {
6767

6868
// Create Perf analyzer
6969
auto perf_analyzer = std::make_shared<ppc::core::Perf>(test_task_tbb);
70-
perf_analyzer->task_run(perf_attr, perf_results);
71-
ppc::core::Perf::print_perf_statistic(perf_results);
70+
perf_analyzer->TaskRun(perf_attr, perf_results);
71+
ppc::core::Perf::PrintPerfStatistic(perf_results);
7272
ASSERT_EQ(count + 1, out[0]);
7373
}

0 commit comments

Comments
 (0)