File tree Expand file tree Collapse file tree
modules/performance/include Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414namespace ppc ::performance {
1515
16+ inline double DefaultTimer () {
17+ return -1.0 ;
18+ }
19+
1620struct PerfAttr {
1721 // / @brief Number of times the task is run for performance evaluation.
1822 uint64_t num_running = 5 ;
1923 // / @brief Timer function returning current time in seconds.
2024 // / @cond
21- std::function<double ()> current_timer = [&] { return - 1.0 ; } ;
25+ std::function<double ()> current_timer = DefaultTimer ;
2226 // / @endcond
2327};
2428
@@ -41,7 +45,7 @@ class Perf {
4145 void PipelineRun (const PerfAttr& perf_attr) {
4246 perf_results_.type_of_running = PerfResults::TypeOfRunning::kPipeline ;
4347
44- CommonRun (perf_attr, [&]() {
48+ CommonRun (perf_attr, [&] {
4549 task_->Validation ();
4650 task_->PreProcessing ();
4751 task_->Run ();
@@ -54,7 +58,7 @@ class Perf {
5458
5559 task_->Validation ();
5660 task_->PreProcessing ();
57- CommonRun (perf_attr, [&]() { task_->Run (); }, perf_results_);
61+ CommonRun (perf_attr, [&] { task_->Run (); }, perf_results_);
5862 task_->PostProcessing ();
5963
6064 task_->Validation ();
You can’t perform that action at this time.
0 commit comments