8
#ifndef OPENCV_CORE_OPENCL_DEFS_HPP
9
#define OPENCV_CORE_OPENCL_DEFS_HPP
11
#include "opencv2/core/utility.hpp"
14
namespace
cv
{
namespace
ocl {
17CV_EXPORTS
bool
isOpenCLActivated();
19
static
inline
bool
isOpenCLActivated() {
return
false; }
28
#ifdef CV_OPENCL_RUN_VERBOSE
29
#define CV_OCL_RUN_(condition, func, ...) \
31
if (cv::ocl::isOpenCLActivated() && (condition) && func) \
33
printf("%s: OpenCL implementation is running\n", CV_Func); \
35
CV_IMPL_ADD(CV_IMPL_OCL); \
40
printf("%s: Plain implementation is running\n", CV_Func); \
44
#elif defined CV_OPENCL_RUN_ASSERT
45
#define CV_OCL_RUN_(condition, func, ...) \
47
if (cv::ocl::isOpenCLActivated() && (condition)) \
51
CV_IMPL_ADD(CV_IMPL_OCL); \
55
CV_Error(cv::Error::StsAssert, #func); \
61
#define CV_OCL_RUN_(condition, func, ...) \
64
if (cv::ocl::isOpenCLActivated() && (condition) && func) \
66
CV_IMPL_ADD(CV_IMPL_OCL); \
70
catch (const cv::Exception& e) \
77
#define CV_OCL_RUN_(condition, func, ...)
80
#define CV_OCL_RUN(condition, func) CV_OCL_RUN_(condition, func)
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75