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 () { return -1.0 ; }
17+
1618struct PerfAttr {
1719 // / @brief Number of times the task is run for performance evaluation.
1820 uint64_t num_running = 5 ;
1921 // / @brief Timer function returning current time in seconds.
2022 // / @cond
21- std::function<double ()> current_timer = [&] { return - 1.0 ; } ;
23+ std::function<double ()> current_timer = DefaultTimer ;
2224 // / @endcond
2325};
2426
@@ -41,7 +43,7 @@ class Perf {
4143 void PipelineRun (const PerfAttr& perf_attr) {
4244 perf_results_.type_of_running = PerfResults::TypeOfRunning::kPipeline ;
4345
44- CommonRun (perf_attr, [&]() {
46+ CommonRun (perf_attr, [&] {
4547 task_->Validation ();
4648 task_->PreProcessing ();
4749 task_->Run ();
@@ -54,7 +56,7 @@ class Perf {
5456
5557 task_->Validation ();
5658 task_->PreProcessing ();
57- CommonRun (perf_attr, [&]() { task_->Run (); }, perf_results_);
59+ CommonRun (perf_attr, [&] { task_->Run (); }, perf_results_);
5860 task_->PostProcessing ();
5961
6062 task_->Validation ();
You can’t perform that action at this time.
0 commit comments