diff --git a/modules/ts/include/opencv2/ts/ts_perf.hpp b/modules/ts/include/opencv2/ts/ts_perf.hpp index e5023150fb..22538ef3a2 100644 --- a/modules/ts/include/opencv2/ts/ts_perf.hpp +++ b/modules/ts/include/opencv2/ts/ts_perf.hpp @@ -187,6 +187,7 @@ private: cv::FileStorage storageOut; cv::FileNode rootIn; std::string currentTestNodeName; + std::string suiteName; cv::FileStorage& write(); diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp index 817b75447f..e5158b6367 100644 --- a/modules/ts/src/ts_perf.cpp +++ b/modules/ts/src/ts_perf.cpp @@ -184,6 +184,8 @@ void Regression::init(const std::string& testSuitName, const std::string& ext) storageOutPath = testSuitName; } + suiteName = testSuitName; + try { if (storageIn.open(storageInPath, cv::FileStorage::READ)) @@ -562,6 +564,12 @@ Regression& Regression::operator() (const std::string& name, cv::InputArray arra std::string nodename = getCurrentTestNodeName(); +#ifdef HAVE_CUDA + static const std::string prefix = (param_run_cpu)? "CPU_" : "GPU_"; + if(suiteName == "gpu") + nodename = prefix + nodename; +#endif + cv::FileNode n = rootIn[nodename]; if(n.isNone()) {