1818#include " task/include/task.hpp"
1919#include " util/include/util.hpp"
2020
21- using namespace ppc ::task;
22- using namespace ppc ::performance;
23-
2421namespace ppc ::util {
2522
2623double GetTimeMPI ();
2724int GetMPIRank ();
2825
2926template <typename InType, typename OutType>
30- using PerfTestParam =
31- std::tuple<std::function<TaskPtr<InType, OutType>(InType)>, std::string, PerfResults::TypeOfRunning>;
27+ using PerfTestParam = std::tuple<std::function<ppc::task::TaskPtr<InType, OutType>(InType)>, std::string,
28+ ppc::performance:: PerfResults::TypeOfRunning>;
3229
3330template <typename InType, typename OutType>
3431// / @brief Base class for performance testing of parallel tasks.
@@ -38,7 +35,7 @@ class BaseRunPerfTests : public ::testing::TestWithParam<PerfTestParam<InType, O
3835 public:
3936 // / @brief Generates a readable name for the performance test case.
4037 static std::string CustomPerfTestName (const ::testing::TestParamInfo<PerfTestParam<InType, OutType>>& info) {
41- return GetStringParamName (std::get<GTestParamIndex::kTestParams >(info.param )) + " _" +
38+ return ppc::performance:: GetStringParamName (std::get<GTestParamIndex::kTestParams >(info.param )) + " _" +
4239 std::get<GTestParamIndex::kNameTest >(info.param );
4340 }
4441
@@ -47,7 +44,7 @@ class BaseRunPerfTests : public ::testing::TestWithParam<PerfTestParam<InType, O
4744 // / @brief Supplies input data for performance testing.
4845 virtual InType GetTestInputData () = 0;
4946
50- virtual void SetPerfAttributes (PerfAttr& perf_attrs) {
47+ virtual void SetPerfAttributes (ppc::performance:: PerfAttr& perf_attrs) {
5148 if (task_->GetDynamicTypeOfTask () == ppc::task::TypeOfTask::kMPI ||
5249 task_->GetDynamicTypeOfTask () == ppc::task::TypeOfTask::kALL ) {
5350 const double t0 = GetTimeMPI ();
@@ -80,13 +77,13 @@ class BaseRunPerfTests : public ::testing::TestWithParam<PerfTestParam<InType, O
8077 }
8178
8279 task_ = task_getter (GetTestInputData ());
83- Perf perf (task_);
84- PerfAttr perf_attr;
80+ ppc::performance:: Perf perf (task_);
81+ ppc::performance:: PerfAttr perf_attr;
8582 SetPerfAttributes (perf_attr);
8683
87- if (mode == PerfResults::TypeOfRunning::kPipeline ) {
84+ if (mode == ppc::performance:: PerfResults::TypeOfRunning::kPipeline ) {
8885 perf.PipelineRun (perf_attr);
89- } else if (mode == PerfResults::TypeOfRunning::kTaskRun ) {
86+ } else if (mode == ppc::performance:: PerfResults::TypeOfRunning::kTaskRun ) {
9087 perf.TaskRun (perf_attr);
9188 } else {
9289 std::stringstream err_msg;
@@ -103,16 +100,18 @@ class BaseRunPerfTests : public ::testing::TestWithParam<PerfTestParam<InType, O
103100 }
104101
105102 private:
106- TaskPtr<InType, OutType> task_;
103+ ppc::task:: TaskPtr<InType, OutType> task_;
107104};
108105
109106template <typename TaskType, typename InputType>
110107auto MakePerfTaskTuples (const std::string& settings_path) {
111- const auto name =
112- std::string (GetNamespace<TaskType>()) + " _ " + GetStringTaskType (TaskType::GetStaticTypeOfTask (), settings_path);
108+ const auto name = std::string (GetNamespace<TaskType>()) + " _ " +
109+ ppc::task:: GetStringTaskType (TaskType::GetStaticTypeOfTask (), settings_path);
113110
114- return std::make_tuple (std::make_tuple (TaskGetter<TaskType, InputType>, name, PerfResults::TypeOfRunning::kPipeline ),
115- std::make_tuple (TaskGetter<TaskType, InputType>, name, PerfResults::TypeOfRunning::kTaskRun ));
111+ return std::make_tuple (std::make_tuple (ppc::task::TaskGetter<TaskType, InputType>, name,
112+ ppc::performance::PerfResults::TypeOfRunning::kPipeline ),
113+ std::make_tuple (ppc::task::TaskGetter<TaskType, InputType>, name,
114+ ppc::performance::PerfResults::TypeOfRunning::kTaskRun ));
116115}
117116
118117template <typename Tuple, std::size_t ... I>
0 commit comments