OpenCV  4.5.0-dev
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::ocl::Context Class Reference

#include <opencv2/core/ocl.hpp>

Public Member Functions

 Context ()
 
 Context (int dtype)
 
 Context (const Context &c)
 
 ~Context ()
 
bool create ()
 
bool create (int dtype)
 
Devicedevice (size_t idx) const
 
bool empty () const
 
Impl * getImpl () const
 
Program getProg (const ProgramSource &prog, const String &buildopt, String &errmsg)
 
size_t ndevices () const
 
Contextoperator= (const Context &c)
 
void * ptr () const
 
void release ()
 
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 ContextgetDefault (bool initialize=true)
 

Public Attributes

Impl * p
 

Constructor & Destructor Documentation

◆ Context() [1/3]

cv::ocl::Context::Context ( )

◆ Context() [2/3]

cv::ocl::Context::Context ( int  dtype)
explicit

◆ ~Context()

cv::ocl::Context::~Context ( )

◆ Context() [3/3]

cv::ocl::Context::Context ( const Context c)

Member Function Documentation

◆ create() [1/3]

bool cv::ocl::Context::create ( )

◆ create() [2/3]

bool cv::ocl::Context::create ( int  dtype)

◆ create() [3/3]

static Context cv::ocl::Context::create ( const std::string &  configuration)
static

◆ device()

Device& cv::ocl::Context::device ( size_t  idx) const

◆ empty()

bool cv::ocl::Context::empty ( ) const
inline

◆ fromDevice()

static Context cv::ocl::Context::fromDevice ( const ocl::Device device)
static

◆ fromHandle()

static Context cv::ocl::Context::fromHandle ( void *  context)
static
Parameters
contextOpenCL handle (cl_context). clRetainContext() is called on success

◆ getDefault()

static Context& cv::ocl::Context::getDefault ( bool  initialize = true)
static

Get thread-local OpenCL context (initialize if necessary)

◆ getImpl()

Impl* cv::ocl::Context::getImpl ( ) const
inline

◆ getProg()

Program cv::ocl::Context::getProg ( const ProgramSource prog,
const String buildopt,
String errmsg 
)

◆ ndevices()

size_t cv::ocl::Context::ndevices ( ) const

◆ operator=()

Context& cv::ocl::Context::operator= ( const Context c)

◆ ptr()

void* cv::ocl::Context::ptr ( ) const
Returns
cl_context value

◆ release()

void cv::ocl::Context::release ( )

◆ setUseSVM()

void cv::ocl::Context::setUseSVM ( bool  enabled)

◆ unloadProg()

void cv::ocl::Context::unloadProg ( Program prog)

◆ useSVM()

bool cv::ocl::Context::useSVM ( ) const

Member Data Documentation

◆ p

Impl* cv::ocl::Context::p

The documentation for this class was generated from the following file: