#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 |
|
保護 |
此類文件由以下檔案生成