1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

ocl: correct disabling of OpenCL code

This commit is contained in:
Alexander Alekhin
2015-06-19 20:52:14 +03:00
parent 190d00ea3e
commit 7213e5f68a
16 changed files with 127 additions and 18 deletions
+9 -1
View File
@@ -54,7 +54,9 @@
#include "opencv2/core/private.hpp"
#include "opencv2/core/private.cuda.hpp"
#ifdef HAVE_OPENCL
#include "opencv2/core/ocl.hpp"
#endif
#include "opencv2/hal.hpp"
@@ -262,7 +264,11 @@ struct ImplCollector
struct CoreTLSData
{
CoreTLSData() : device(0), useOpenCL(-1), useIPP(-1)
CoreTLSData() :
#ifdef HAVE_OPENCL
device(0), useOpenCL(-1),
#endif
useIPP(-1)
{
#ifdef HAVE_TEGRA_OPTIMIZATION
useTegra = -1;
@@ -270,9 +276,11 @@ struct CoreTLSData
}
RNG rng;
#ifdef HAVE_OPENCL
int device;
ocl::Queue oclQueue;
int useOpenCL; // 1 - use, 0 - do not use, -1 - auto/not initialized
#endif
int useIPP; // 1 - use, 0 - do not use, -1 - auto/not initialized
#ifdef HAVE_TEGRA_OPTIMIZATION
int useTegra; // 1 - use, 0 - do not use, -1 - auto/not initialized