#include <opencv2/core/ocl.hpp>
|
| std::shared_ptr< Impl > | p |
| |
◆ OpenCLExecutionContext() [1/3]
| cv::ocl::OpenCLExecutionContext::OpenCLExecutionContext |
( |
| ) |
|
|
默认 |
◆ ~OpenCLExecutionContext()
| cv::ocl::OpenCLExecutionContext::~OpenCLExecutionContext |
( |
| ) |
|
|
默认 |
◆ 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 |
|
protected |
此类的文档是从以下文件生成的