Skip to content

Revert range-based loops change #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Checks: >
-misc-unused-parameters,
-misc-use-anonymous-namespace,
-modernize-avoid-c-arrays,
-modernize-loop-convert,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-function-cognitive-complexity,
Expand Down
4 changes: 2 additions & 2 deletions modules/core/perf/include/perf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ struct PerfResults {
class Perf {
public:
// Init performance analysis with initialized task and initialized data
explicit Perf(const std::shared_ptr<Task>& task);
explicit Perf(const std::shared_ptr<Task>& task_ptr);
// Set task with initialized task and initialized data for performance
// analysis c
void SetTask(const std::shared_ptr<Task>& task);
void SetTask(const std::shared_ptr<Task>& task_ptr);
// Check performance of full task's pipeline: pre_processing() ->
// validation() -> run() -> post_processing()
void PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
Expand Down
8 changes: 4 additions & 4 deletions modules/core/perf/src/perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include <sstream>
#include <utility>

ppc::core::Perf::Perf(const std::shared_ptr<Task>& task) { SetTask(task); }
ppc::core::Perf::Perf(const std::shared_ptr<Task>& task_ptr) { SetTask(task_ptr); }

void ppc::core::Perf::SetTask(const std::shared_ptr<Task>& task) {
task->get_data()->state_of_testing = TaskData::StateOfTesting::PERF;
this->task = task;
void ppc::core::Perf::SetTask(const std::shared_ptr<Task>& task_ptr) {
task_ptr->get_data()->state_of_testing = TaskData::StateOfTesting::PERF;
this->task = task_ptr;
}

void ppc::core::Perf::PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
Expand Down
12 changes: 6 additions & 6 deletions tasks/omp/example/src/ops_omp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ bool nesterov_a_test_task_omp::TestOMPTaskParallel::run_impl() {
auto temp_res = res;
if (ops == "+") {
#pragma omp parallel for reduction(+ : temp_res)
for (int i : input_) {
temp_res += i;
for (int i = 0; i < static_cast<int>(input_.size()); i++) {
temp_res += input_[i];
}
} else if (ops == "-") {
#pragma omp parallel for reduction(- : temp_res)
for (int i : input_) {
temp_res -= i;
for (int i = 0; i < static_cast<int>(input_.size()); i++) {
temp_res -= input_[i];
}
} else if (ops == "*") {
#pragma omp parallel for reduction(* : temp_res)
for (int i : input_) {
temp_res *= i;
for (int i = 0; i < static_cast<int>(input_.size()); i++) {
temp_res *= input_[i];
}
}
res = temp_res;
Expand Down
Loading