mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge pull request #7787 from alalek:ocl_explicit_only
This commit is contained in:
@@ -739,6 +739,9 @@ CV_EXPORTS MatAllocator* getOpenCLAllocator();
|
||||
#ifdef __OPENCV_BUILD
|
||||
namespace internal {
|
||||
|
||||
CV_EXPORTS bool isOpenCLForced();
|
||||
#define OCL_FORCE_CHECK(condition) (cv::ocl::internal::isOpenCLForced() || (condition))
|
||||
|
||||
CV_EXPORTS bool isPerformanceCheckBypassed();
|
||||
#define OCL_PERFORMANCE_CHECK(condition) (cv::ocl::internal::isPerformanceCheckBypassed() || (condition))
|
||||
|
||||
|
||||
@@ -6073,6 +6073,18 @@ void* Image2D::ptr() const
|
||||
return p ? p->handle : 0;
|
||||
}
|
||||
|
||||
bool internal::isOpenCLForced()
|
||||
{
|
||||
static bool initialized = false;
|
||||
static bool value = false;
|
||||
if (!initialized)
|
||||
{
|
||||
value = getBoolParameter("OPENCV_OPENCL_FORCE", false);
|
||||
initialized = true;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
bool internal::isPerformanceCheckBypassed()
|
||||
{
|
||||
static bool initialized = false;
|
||||
|
||||
Reference in New Issue
Block a user