Skip to content

Commit

Permalink
Fix perf test technology
Browse files Browse the repository at this point in the history
  • Loading branch information
mahbhlddnhakkh committed Apr 23, 2024
1 parent 8f368bf commit b39f21b
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tasks/omp/kulagin_a_gauss_filter_vert/perf_tests/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2024 Kulagin Aleksandr
#include <gtest/gtest.h>
#include <omp.h>

#include "core/perf/include/perf.hpp"
#include "omp/kulagin_a_gauss_filter_vert/include/ops_omp.hpp"
Expand Down Expand Up @@ -31,12 +32,7 @@ TEST(kulagin_a_gauss_filter_vert_seq, test_pipeline_run) {
// Create Perf attributes
auto perfAttr = std::make_shared<ppc::core::PerfAttr>();
perfAttr->num_running = 10;
const auto t0 = std::chrono::high_resolution_clock::now();
perfAttr->current_timer = [&] {
auto current_time_point = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(current_time_point - t0).count();
return static_cast<double>(duration) * 1e-9;
};
perfAttr->current_timer = [&] { return omp_get_wtime(); };

// Create and init perf results
auto perfResults = std::make_shared<ppc::core::PerfResults>();
Expand Down Expand Up @@ -78,12 +74,7 @@ TEST(kulagin_a_gauss_filter_vert_seq, test_task_run) {
// Create Perf attributes
auto perfAttr = std::make_shared<ppc::core::PerfAttr>();
perfAttr->num_running = 10;
const auto t0 = std::chrono::high_resolution_clock::now();
perfAttr->current_timer = [&] {
auto current_time_point = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(current_time_point - t0).count();
return static_cast<double>(duration) * 1e-9;
};
perfAttr->current_timer = [&] { return omp_get_wtime(); };

// Create and init perf results
auto perfResults = std::make_shared<ppc::core::PerfResults>();
Expand Down

0 comments on commit b39f21b

Please sign in to comment.