#include <opencv2/core/ocl.hpp>
|
| std::shared_ptr< Impl > | p |
| |
◆ OpenCLExecutionContext() [1/3]
| cv::ocl::OpenCLExecutionContext::OpenCLExecutionContext |
( |
| ) |
|
|
default |
◆ ~OpenCLExecutionContext()
| cv::ocl::OpenCLExecutionContext::~OpenCLExecutionContext |
( |
| ) |
|
|
default |
◆ OpenCLExecutionContext() [2/3]
◆ OpenCLExecutionContext() [3/3]
◆ bind()
| void cv::ocl::OpenCLExecutionContext::bind |
( |
| ) |
const |
将此 OpenCL 执行上下文绑定到当前线程。
Context 不能为空。
- 注意
- 未为先前执行上下文的队列调用 clFinish
◆ cloneWithNewQueue() [1/2]
这是一个重载的成员函数,为了方便而提供。它与上述函数的不同之处仅在于它接受的参数。
◆ cloneWithNewQueue() [2/2]
创建具有相同 OpenCV 上下文和设备的新执行上下文
- 参数
-
◆ create() [1/3]
这是一个重载的成员函数,为了方便而提供。它与上述函数的不同之处仅在于它接受的参数。
◆ create() [2/3]
创建 OpenCL 执行上下文。
- 参数
-
| context | 非空的 OpenCL 上下文 |
| device | 非空的 OpenCL 设备(必须是上下文的一部分) |
| queue | 提供的上下文和设备的非空 OpenCL 队列 |
◆ create() [3/3]
| static OpenCLExecutionContext cv::ocl::OpenCLExecutionContext::create |
( |
const std::string & | platformName, |
|
|
void * | platformID, |
|
|
void * | context, |
|
|
void * | deviceID ) |
|
static |
创建 OpenCL 执行上下文。OpenCV 将检查可用的 OpenCL 平台是否具有 platformName 名称,然后将上下文分配给 OpenCV。deviceID 设备将用作目标设备,并将创建一个新的命令队列。
- 注意
- 成功后,将获取上下文和设备的一个引用的所有权。如果调用者希望继续使用它们,则应另外调用
clRetainContext 和/或 clRetainDevice 以增加引用计数。
- 参数
-
| platformName | 要附加的 OpenCL 平台的名称,此字符串用于检查平台在运行时是否可用于 OpenCV |
| platformID | 附加上下文为其创建的平台 ID (cl_platform_id) |
| context | 要附加到 OpenCV 的 OpenCL 上下文 (cl_context) |
| deviceID | OpenCL 设备 (cl_device_id) |
◆ empty()
| bool cv::ocl::OpenCLExecutionContext::empty |
( |
| ) |
const |
|
inline |
◆ getContext()
| Context & cv::ocl::OpenCLExecutionContext::getContext |
( |
| ) |
const |
◆ getCurrent()
获取当前线程的 OpenCL 执行上下文。
如果 OpenCL 执行上下文为空,则初始化它
- 创建新的
- 重用主线程的上下文(threadID = 0)
◆ getCurrentRef()
获取当前线程的 OpenCL 执行上下文(可以为空)
◆ getDevice()
| Device & cv::ocl::OpenCLExecutionContext::getDevice |
( |
| ) |
const |
◆ getQueue()
| Queue & cv::ocl::OpenCLExecutionContext::getQueue |
( |
| ) |
const |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ release()
| void cv::ocl::OpenCLExecutionContext::release |
( |
| ) |
|
◆ setUseOpenCL()
| void cv::ocl::OpenCLExecutionContext::setUseOpenCL |
( |
bool | flag | ) |
|
◆ useOpenCL()
| bool cv::ocl::OpenCLExecutionContext::useOpenCL |
( |
| ) |
const |
| std::shared_ptr<Impl> cv::ocl::OpenCLExecutionContext::p |
|
保护 |
此类文档由以下文件生成