OpenCV453
公開メンバ関数 | 静的公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
cv::ocl::OpenCLExecutionContext クラス

公開メンバ関数

 OpenCLExecutionContext (const OpenCLExecutionContext &)=default
 
 OpenCLExecutionContext (OpenCLExecutionContext &&)=default
 
OpenCLExecutionContextoperator= (const OpenCLExecutionContext &)=default
 
OpenCLExecutionContextoperator= (OpenCLExecutionContext &&)=default
 
ContextgetContext () const
 
DevicegetDevice () const
 
QueuegetQueue () const
 
bool useOpenCL () const
 
void setUseOpenCL (bool flag)
 
void bind () const
 
OpenCLExecutionContext cloneWithNewQueue (const ocl::Queue &q) const
 
OpenCLExecutionContext cloneWithNewQueue () const
 
bool empty () const
 
void release ()
 

静的公開メンバ関数

static OpenCLExecutionContextgetCurrent ()
 
static OpenCLExecutionContextgetCurrentRef ()
 
static OpenCLExecutionContext create (const std::string &platformName, void *platformID, void *context, void *deviceID)
 Creates OpenCL execution context OpenCV will check if available OpenCL platform has platformName name, then assign context to OpenCV and call clRetainContext function. The deviceID device will be used as target device and new command queue will be created. [詳解]
 
static OpenCLExecutionContext create (const Context &context, const Device &device, const ocl::Queue &queue)
 Creates OpenCL execution context [詳解]
 
static OpenCLExecutionContext create (const Context &context, const Device &device)
 

限定公開変数類

std::shared_ptr< Impl > p
 

関数詳解

◆ bind()

void cv::ocl::OpenCLExecutionContext::bind ( ) const

Bind this OpenCL execution context to current thread.

Context can't be empty.

覚え書き
clFinish is not called for queue of previous execution context

◆ cloneWithNewQueue() [1/2]

OpenCLExecutionContext cv::ocl::OpenCLExecutionContext::cloneWithNewQueue ( ) const

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

◆ cloneWithNewQueue() [2/2]

OpenCLExecutionContext cv::ocl::OpenCLExecutionContext::cloneWithNewQueue ( const ocl::Queue q) const

Creates new execution context with same OpenCV context and device

引数
qOpenCL queue

◆ create() [1/3]

static OpenCLExecutionContext cv::ocl::OpenCLExecutionContext::create ( const Context context,
const Device device 
)
static

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

◆ create() [2/3]

static OpenCLExecutionContext cv::ocl::OpenCLExecutionContext::create ( const Context context,
const Device device,
const ocl::Queue queue 
)
static

Creates OpenCL execution context

引数
contextnon-empty OpenCL context
devicenon-empty OpenCL device (must be a part of context)
queuenon-empty OpenCL queue for provided context and device

◆ create() [3/3]

static OpenCLExecutionContext cv::ocl::OpenCLExecutionContext::create ( const std::string &  platformName,
void *  platformID,
void *  context,
void *  deviceID 
)
static

Creates OpenCL execution context OpenCV will check if available OpenCL platform has platformName name, then assign context to OpenCV and call clRetainContext function. The deviceID device will be used as target device and new command queue will be created.

覚え書き
Lifetime of passed handles is transferred to OpenCV wrappers on success
引数
platformNamename of OpenCL platform to attach, this string is used to check if platform is available to OpenCV at runtime
platformIDID of platform attached context was created for (cl_platform_id)
contextOpenCL context to be attached to OpenCV (cl_context)
deviceIDOpenCL device (cl_device_id)

◆ getContext()

Context & cv::ocl::OpenCLExecutionContext::getContext ( ) const

Get associated ocl::Context

◆ getCurrent()

static OpenCLExecutionContext & cv::ocl::OpenCLExecutionContext::getCurrent ( )
static

Get OpenCL execution context of current thread.

Initialize OpenCL execution context if it is empty

  • create new
  • reuse context of the main thread (threadID = 0)

◆ getCurrentRef()

static OpenCLExecutionContext & cv::ocl::OpenCLExecutionContext::getCurrentRef ( )
static

Get OpenCL execution context of current thread (can be empty)

◆ getDevice()

Device & cv::ocl::OpenCLExecutionContext::getDevice ( ) const

Get the single default associated ocl::Device

◆ getQueue()

Queue & cv::ocl::OpenCLExecutionContext::getQueue ( ) const

Get the single ocl::Queue that is associated with the ocl::Context and the single default ocl::Device


このクラス詳解は次のファイルから抽出されました: