class cv::ocl::Device
#include <ocl.hpp>
class Device
{
public:
// enums
enum
{
TYPE_DEFAULT = (1 <<0),
TYPE_CPU = (1 <<1),
TYPE_GPU = (1 <<2),
TYPE_ACCELERATOR = (1 <<3),
TYPE_DGPU = TYPE_GPU + (1 <<16),
TYPE_IGPU = TYPE_GPU + (1 <<17),
TYPE_ALL = 0xFFFFFFFF,
};
enum
{
FP_DENORM =(1 <<0),
FP_INF_NAN =(1 <<1),
FP_ROUND_TO_NEAREST =(1 <<2),
FP_ROUND_TO_ZERO =(1 <<3),
FP_ROUND_TO_INF =(1 <<4),
FP_FMA =(1 <<5),
FP_SOFT_FLOAT =(1 <<6),
FP_CORRECTLY_ROUNDED_DIVIDE_SQRT =(1 <<7),
};
enum
{
EXEC_KERNEL =(1 <<0),
EXEC_NATIVE_KERNEL =(1 <<1),
};
enum
{
NO_CACHE =0,
READ_ONLY_CACHE =1,
READ_WRITE_CACHE =2,
};
enum
{
NO_LOCAL_MEM =0,
LOCAL_IS_LOCAL =1,
LOCAL_IS_GLOBAL =2,
};
enum
{
UNKNOWN_VENDOR =0,
VENDOR_AMD =1,
VENDOR_INTEL =2,
VENDOR_NVIDIA =3,
};
// construction
Device();
Device(void* d);
Device(const Device& d);
// methods
int
addressBits() const;
bool
available() const;
bool
compilerAvailable() const;
int
deviceVersionMajor() const;
int
deviceVersionMinor() const;
int
doubleFPConfig() const;
String
driverVersion() const;
bool
endianLittle() const;
bool
errorCorrectionSupport() const;
int
executionCapabilities() const;
String
extensions() const;
int
globalMemCacheLineSize() const;
size_t
globalMemCacheSize() const;
int
globalMemCacheType() const;
size_t
globalMemSize() const;
int
halfFPConfig() const;
bool
hostUnifiedMemory() const;
size_t
image2DMaxHeight() const;
size_t
image2DMaxWidth() const;
size_t
image3DMaxDepth() const;
size_t
image3DMaxHeight() const;
size_t
image3DMaxWidth() const;
uint
imageBaseAddressAlignment() const;
bool
imageFromBufferSupport() const;
size_t
imageMaxArraySize() const;
size_t
imageMaxBufferSize() const;
uint
imagePitchAlignment() const;
bool
imageSupport() const;
bool
intelSubgroupsSupport() const;
bool
isAMD() const;
bool
isIntel() const;
bool
isNVidia() const;
bool
linkerAvailable() const;
size_t
localMemSize() const;
int
localMemType() const;
int
maxClockFrequency() const;
int
maxComputeUnits() const;
int
maxConstantArgs() const;
size_t
maxConstantBufferSize() const;
size_t
maxMemAllocSize() const;
size_t
maxParameterSize() const;
int
maxReadImageArgs() const;
int
maxSamplers() const;
size_t
maxWorkGroupSize() const;
int
maxWorkItemDims() const;
void
maxWorkItemSizes(size_t*) const;
int
maxWriteImageArgs() const;
int
memBaseAddrAlign() const;
String
name() const;
int
nativeVectorWidthChar() const;
int
nativeVectorWidthDouble() const;
int
nativeVectorWidthFloat() const;
int
nativeVectorWidthHalf() const;
int
nativeVectorWidthInt() const;
int
nativeVectorWidthLong() const;
int
nativeVectorWidthShort() const;
String
OpenCL_C_Version() const;
String
OpenCLVersion() const;
Device&
operator=(const Device& d);
int
preferredVectorWidthChar() const;
int
preferredVectorWidthDouble() const;
int
preferredVectorWidthFloat() const;
int
preferredVectorWidthHalf() const;
int
preferredVectorWidthInt() const;
int
preferredVectorWidthLong() const;
int
preferredVectorWidthShort() const;
size_t
printfBufferSize() const;
size_t
profilingTimerResolution() const;
void*
ptr() const;
void
set(void* d);
int
singleFPConfig() const;
int
type() const;
int
vendorID() const;
String
vendorName() const;
String
version() const;
static
const Device&
getDefault();
protected:
// fields
Impl* p;
};