OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
cv::ocl::ProgramSource 類參考

#include <opencv2/core/ocl.hpp>

cv::ocl::ProgramSource 的協作圖

公共型別

typedef uint64 hash_t
 

公共成員函式

 ProgramSource () CV_NOEXCEPT
 
 ProgramSource (const char *prog)
 
 ProgramSource (const ProgramSource &prog)
 
 ProgramSource (const String &module, const String &name, const String &codeStr, const String &codeHash)
 
 ProgramSource (const String &prog)
 
 ProgramSource (ProgramSource &&prog) CV_NOEXCEPT
 
 ~ProgramSource ()
 
bool empty () const
 
ImplgetImpl () const
 
hash_t hash () const
 
ProgramSourceoperator= (const ProgramSource &prog)
 
ProgramSourceoperator= (ProgramSource &&prog) CV_NOEXCEPT
 
const Stringsource () const
 

靜態公共成員函式

static ProgramSource fromBinary (const String &module, const String &name, const unsigned char *binary, const size_t size, const cv::String &buildOptions=cv::String())
 描述 OpenCL 程式二進位制檔案。不要呼叫 clCreateProgramWithBinary() 和/或 clBuildProgram()。
 
static ProgramSource fromSPIR (const String &module, const String &name, const unsigned char *binary, const size_t size, const cv::String &buildOptions=cv::String())
 描述 SPIR 格式的 OpenCL 程式。不要呼叫 clCreateProgramWithBinary() 和/或 clBuildProgram()。
 

保護屬性

Implp
 

友元

struct Impl
 

成員 Typedef 文件

◆ hash_t

建構函式 & 解構函式文件

◆ ProgramSource() [1/6]

cv::ocl::ProgramSource::ProgramSource ( )

◆ ProgramSource() [2/6]

cv::ocl::ProgramSource::ProgramSource ( const String & module,
const String & name,
const String & codeStr,
const String & codeHash )
顯式

◆ ProgramSource() [3/6]

cv::ocl::ProgramSource::ProgramSource ( const String & prog)
顯式

◆ ProgramSource() [4/6]

cv::ocl::ProgramSource::ProgramSource ( const char * prog)
顯式

◆ ~ProgramSource()

cv::ocl::ProgramSource::~ProgramSource ( )

◆ ProgramSource() [5/6]

cv::ocl::ProgramSource::ProgramSource ( const ProgramSource & prog)

◆ ProgramSource() [6/6]

cv::ocl::ProgramSource::ProgramSource ( ProgramSource && prog)

成員函式文件

◆ empty()

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

◆ fromBinary()

static ProgramSource cv::ocl::ProgramSource::fromBinary ( const String & module,
const String & name,
const unsigned char * binary,
const size_t size,
const cv::String & buildOptions = cv::String() )
static

描述 OpenCL 程式二進位制檔案。不要呼叫 clCreateProgramWithBinary() 和/或 clBuildProgram()。

呼叫者應保證二進位制緩衝區的生命週期大於 ProgramSource 物件(及其任何副本)。

這種二進位制檔案通常在平臺之間不可移植 - 它特定於 OpenCL 供應商/裝置/驅動程式版本。

引數
module程式所有者模組的名稱
name程式的唯一名稱(module+name 用作 OpenCL 程式快取的鍵)
binary緩衝區地址。請參閱描述中的緩衝區生命週期要求。
size緩衝區大小
buildOptions傳遞給 clBuildProgram() 的其他程式相關構建選項
返回
已建立的 ProgramSource 物件

◆ fromSPIR()

static ProgramSource cv::ocl::ProgramSource::fromSPIR ( const String & module,
const String & name,
const unsigned char * binary,
const size_t size,
const cv::String & buildOptions = cv::String() )
static

描述 SPIR 格式的 OpenCL 程式。不要呼叫 clCreateProgramWithBinary() 和/或 clBuildProgram()。

預設情況下支援 SPIR 1.2(在 buildOptions 中傳遞 '-spir-std=X.Y' 以覆蓋此行為)

呼叫者應保證二進位制緩衝區的生命週期大於 ProgramSource 物件(及其任何副本)。

此格式的程式可以在具有 'khr_spir' 擴充套件的 OpenCL 實現之間移植:https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/cl_khr_spir.html(但它們在不同的平臺之間不可移植:32 位/64 位)

注意:這些程式不能支援供應商特定的擴充套件,例如 'cl_intel_subgroups'。

引數
module程式所有者模組的名稱
name程式的唯一名稱(module+name 用作 OpenCL 程式快取的鍵)
binary緩衝區地址。請參閱描述中的緩衝區生命週期要求。
size緩衝區大小
buildOptions傳遞給 clBuildProgram() 的其他程式相關構建選項(這些選項會自動新增:'-x spir' 和 '-spir-std=1.2')
返回
已建立的 ProgramSource 物件。

◆ getImpl()

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

◆ hash()

hash_t cv::ocl::ProgramSource::hash ( ) const

◆ operator=() [1/2]

ProgramSource & cv::ocl::ProgramSource::operator= ( const ProgramSource & prog)

◆ operator=() [2/2]

ProgramSource & cv::ocl::ProgramSource::operator= ( ProgramSource && prog)

◆ source()

const String & cv::ocl::ProgramSource::source ( ) const

友元和相關符號文件

◆ Impl

friend struct Impl
friend

成員資料文件

◆ p

Impl* cv::ocl::ProgramSource::p
保護

該類的文件由以下檔案生成