diff --git a/modules/ocl/include/opencv2/ocl/ocl.hpp b/modules/ocl/include/opencv2/ocl/ocl.hpp index dc9183acb..361e29251 100644 --- a/modules/ocl/include/opencv2/ocl/ocl.hpp +++ b/modules/ocl/include/opencv2/ocl/ocl.hpp @@ -158,8 +158,8 @@ namespace cv static void setContext(Info &oclinfo); enum {CL_DOUBLE, CL_UNIFIED_MEM, CL_VER_1_2}; - bool supportsFeature(int ftype); - size_t computeUnits(); + bool supportsFeature(int ftype) const; + size_t computeUnits() const; void* oclContext(); void* oclCommandQueue(); }; diff --git a/modules/ocl/src/initialization.cpp b/modules/ocl/src/initialization.cpp index 34d5ff5e6..c18984b07 100644 --- a/modules/ocl/src/initialization.cpp +++ b/modules/ocl/src/initialization.cpp @@ -1013,7 +1013,7 @@ namespace cv programCache->releaseProgram(); } - bool Context::supportsFeature(int ftype) + bool Context::supportsFeature(int ftype) const { switch(ftype) { @@ -1028,7 +1028,7 @@ namespace cv } } - size_t Context::computeUnits() + size_t Context::computeUnits() const { return impl->maxComputeUnits; }