do not dump OpenCL info if it is disabled
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 27 Feb 2015 09:52:44 +0000 (12:52 +0300)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 27 Feb 2015 09:52:44 +0000 (12:52 +0300)
modules/ts/src/ocl_test.cpp

index 270dec9..69d10aa 100644 (file)
@@ -98,6 +98,13 @@ void dumpOpenCLDevice()
 
     try
     {
+        if (!useOpenCL())
+        {
+            DUMP_MESSAGE_STDOUT("OpenCL is disabled");
+            DUMP_PROPERTY_XML("cv_ocl", "disabled");
+            return;
+        }
+
         std::vector<PlatformInfo> platforms;
         cv::ocl::getPlatfomsInfo(platforms);
         if (platforms.size() > 0)