print information message about target device for GPU module tests
authormarina.kolpakova <marina.kolpakova@itseez.com>
Wed, 10 Oct 2012 09:36:24 +0000 (13:36 +0400)
committermarina.kolpakova <marina.kolpakova@itseez.com>
Wed, 10 Oct 2012 12:13:25 +0000 (16:13 +0400)
modules/gpu/perf/utility.cpp
modules/gpu/perf/utility.hpp
modules/ts/src/ts_perf.cpp

index 0c8c926..2808b85 100644 (file)
@@ -4,8 +4,6 @@ using namespace std;
 using namespace cv;\r
 using namespace cv::gpu;\r
 \r
-bool runOnGpu = true;\r
-\r
 void fillRandom(Mat& m, double a, double b)\r
 {\r
     RNG rng(123456789);\r
index 7aaaa24..6ce031a 100644 (file)
@@ -6,8 +6,6 @@
 #include "opencv2/imgproc/imgproc.hpp"\r
 #include "opencv2/ts/ts_perf.hpp"\r
 \r
-extern bool runOnGpu;\r
-\r
 void fillRandom(cv::Mat& m, double a = 0.0, double b = 255.0);\r
 cv::Mat readImage(const std::string& fileName, int flags = cv::IMREAD_COLOR);\r
 \r
index 0a04743..61081b1 100644 (file)
@@ -618,6 +618,11 @@ void TestBase::Init(int argc, const char* const argv[])
 
 #ifdef HAVE_CUDA
     param_run_cpu         = args.has("perf_run_cpu");
+
+    if (param_run_cpu)
+        printf("[----------]\n[ GPU INFO ] \tRun test suite on CPU.\n[----------]\n"), fflush(stdout);
+    else
+        printf("[----------]\n[ GPU INFO ] \tRun test suite on GPU.\n[----------]\n"), fflush(stdout);
 #endif
 
     if (!args.check())