![]() |
OpenCV 4.14.0
Open Source Computer Vision
|
#include <opencv2/core/ocl.hpp>
Classes | |
| class | UserContext |
Public Member Functions | |
| Context () CV_NOEXCEPT | |
| Context (const Context &c) | |
| Context (Context &&c) CV_NOEXCEPT | |
| Context (int dtype) | |
| ~Context () | |
| bool | create () |
| bool | create (int dtype) |
| Device & | device (size_t idx) const |
| bool | empty () const |
| Impl * | getImpl () const |
| void * | getOpenCLContextProperty (int propertyId) const |
| Get OpenCL context property specified on context creation. | |
| Program | getProg (const ProgramSource &prog, const String &buildopt, String &errmsg) |
| template<typename T> | |
| std::shared_ptr< T > | getUserContext () |
| std::shared_ptr< UserContext > | getUserContext (std::type_index typeId) |
| size_t | ndevices () const |
| Context & | operator= (const Context &c) |
| Context & | operator= (Context &&c) CV_NOEXCEPT |
| void * | ptr () const |
| void | release () |
| template<typename T> | |
| void | setUserContext (const std::shared_ptr< T > &userContext) |
| void | setUserContext (std::type_index typeId, const std::shared_ptr< UserContext > &userContext) |
| void | setUseSVM (bool enabled) |
| void | unloadProg (Program &prog) |
| bool | useSVM () const |
Static Public Member Functions | |
| static Context | create (const std::string &configuration) |
| static Context | fromDevice (const ocl::Device &device) |
| static Context | fromHandle (void *context) |
| static Context & | getDefault (bool initialize=true) |
Public Attributes | |
| Impl * | p |
| cv::ocl::Context::Context | ( | ) |
|
explicit |
| cv::ocl::Context::~Context | ( | ) |
| cv::ocl::Context::Context | ( | const Context & | c | ) |
| cv::ocl::Context::Context | ( | Context && | c | ) |
| bool cv::ocl::Context::create | ( | ) |
|
static |
| bool cv::ocl::Context::create | ( | int | dtype | ) |
| Device & cv::ocl::Context::device | ( | size_t | idx | ) | const |
|
inline |
|
static |
|
static |
| context | OpenCL handle (cl_context). clRetainContext() is called on success |
|
static |
Get thread-local OpenCL context (initialize if necessary)
|
inline |
| void * cv::ocl::Context::getOpenCLContextProperty | ( | int | propertyId | ) | const |
Get OpenCL context property specified on context creation.
| propertyId | Property id (CL_CONTEXT_* as defined in cl_context_properties type) |
| Program cv::ocl::Context::getProg | ( | const ProgramSource & | prog, |
| const String & | buildopt, | ||
| String & | errmsg ) |
|
inline |
| std::shared_ptr< UserContext > cv::ocl::Context::getUserContext | ( | std::type_index | typeId | ) |
| size_t cv::ocl::Context::ndevices | ( | ) | const |
| void * cv::ocl::Context::ptr | ( | ) | const |
| void cv::ocl::Context::release | ( | ) |
|
inline |
| void cv::ocl::Context::setUserContext | ( | std::type_index | typeId, |
| const std::shared_ptr< UserContext > & | userContext ) |
| void cv::ocl::Context::setUseSVM | ( | bool | enabled | ) |
| void cv::ocl::Context::unloadProg | ( | Program & | prog | ) |
| bool cv::ocl::Context::useSVM | ( | ) | const |
| Impl* cv::ocl::Context::p |