TOpenCLDevice Class

Header: Dew.Math/clMtxVec.h · Cross-compiler
tObjectTOpenCLDevice

class TOpenCLDevice : public tObject;

Stores data and information associated with the Open CL computing device.

The object holds all information describing the properties of the device, programs, command queues and cache (buffer objects). To use the device we first define the size of the Cache and load the Programs. Then we can access Kernels which can be enqueued to Command queues.

Constructors

NameDescription
TOpenCLDevice (2)

Destructors

NameDescription
~TOpenCLDevice

Properties

NameTypeDescription
AddressBitsintThe default compute device address space size specified as an unsigned integer value in bits. Currently supported values are 32 or 64 bits.
AMDInfoTAMDDeviceInfo*Holds AMD specific device information.
AvailableboolReturns true, if the device is available for use.
ByteAddressableStoreboolReturns true for Open CL v1.1.
CacheTOpenCLCache*The Cache object holds a list of TOpenCLVector and TOpenCLMatrix objects.
CommandQueueTOpenCLCommandQueueList*The list of available command queues. There is always at least one queue.
CompilerAvailableboolReturns true, if the Open CL driver has a compiler included.
D3D10SharingboolIf true then interoperability between OpenCL and Direct3D 10 is supported.
DeviceIDintPtrReturns the Device ID assigned to the device by Open CL driver.
DeviceIndexintReturns the index of the device in the list of devices for the platform.
DevicePlatformTOpenCLPlatform*Returns the platform of the device.
DeviceProfileDewStringOpenCL profile string.
DeviceVersionDewStringReturns the device version.
DriverVersionDewStringReturns the Open CL driver version.
ErrorCorrectionSupportboolReturns true, if global memory uses ECC.
ExecutionCapabilityNativeboolReturns true, if the driver can execute native (not Open CL) kernels.
ExtensionstStringList*Holds a list of extension names supported by the device.
FP16boolReturns true if 16bit half precision floating point math is supported on the device.
FP64boolReturns true if 64bit double precision floating point math is supported on the device.
FPDoubleInfoTFPInfo*Holds information about double precision floating point math.
FPHalfInfoTFPInfo*Holds information about half precision floating point math.
FPSingleInfoTFPInfo*Holds information about single precision floating point math.
GlobalMemCachelineSizeintReturns global memory cache line size in Bytes.
GLobalMemCacheSizelong longReturns global memory cache size in KBytes.
GlobalMemSizelong longSize of global device memory in KBytes.
GLSharingboolCreating CL context from a GL context or share group is supported, if this property returns true.
Image2DMaxHeightintMax height of 2D image in pixels.
Image2DMaxWidthintMax width of 2D image in pixels.
Image3DMaxDepthintMax depth of 3D image in pixels.
Image3DMaxHeightintMax height of 3D image in pixels.
Image3DMaxWidthintMax width of 3D image in pixels.
ImageSupportboolReturns true, if immages are supported by the device.
IsAccTypeboolReturns true if the device is of Accelerator type.
IsCpuTypeboolReturns true if the device is of CPU type.
IsDebuggingbool
IsDefaultboolReturns true if the device is of the default type.
IsGpuTypeboolReturns true if the device is of GPU type.
KernelsTOpenCLKernelList*The kernel list holds the list of kernels (Open CL functions) that are available.
LocalMemSizelong longReturns the size of local memory (if present) in Bytes.
LocalMemTypeTLocalMemTypeReturns lmtLocal, if dedicated local memory storage is available. Returns lmtGlobal oterwhise.
MappedCopybool
MaxClockFrequencyintMaximum configured clock frequency of the device in MHz.
MaxComputeUnitsintReturns the number of parallel compute units on the OpenCL device.
MaxConstantBufferSizelong longReturns the size of constant memory in Bytes.
MaxMemAllocSizelong longMax size of memory object allocation in KBytes.
MaxParameterSizeintReturns maximum size of the parameter in bytes.
MaxReadImageArgsintMax number of simultaneous image objects that can be read by a kernel.
MaxSamplersintMaximum number of samplers that can be used in a kernel.
MaxWorkGroupSizeintMaximum number of work-items in a work-group executing a kernel on a single compute unit, using the data parallel execution model.
MaxWorkItemDimensionsintMaximum dimensions that specify the global and local work-item IDs used by the data parallel execution model.
MaxWriteImageArgsintMax number of simultaneous image objects that can be written by a kernel.
MemBaseAddrAlignintAllignment in bits of memory buffers.
MinDataTypeAlignSizeintMinimum data alignment size.
NameDewStringReturns the name of the device.
NativeCPUboolIf true, application will run optimal CPU code without Open CL when this device will be the target .
NVInfoTNVDeviceInfo*Holds NVidia specific device information.
OpenCLVersionintReturns Open CL Version.
PlatformIndexintReturns the index of the platform in the list of platforms.
PreferredVectorWidthCharintReturns preffered vector width for Open CL char type.
PreferredVectorWidthDoubleintReturns preffered vector width for Open CL double type.
PreferredVectorWidthFloatintReturns preffered vector width for Open CL float type.
PreferredVectorWidthIntintReturns preffered vector width for Open CL int type.
PreferredVectorWidthLongintReturns preffered vector width for Open CL long type.
PreferredVectorWidthShortintReturns preffered vector width for Open CL short type.
ProfilingTimerResolutionintDescribes the resolution of device timer. This is measured in nanoseconds.
ProgramsTOpenCLProgramList*The program list holds the list of compiled Open CL programs.
QueueImmediateExecutionboolIf true, the commands queued in the command-queue can be executed within the callers thread when the clEnqueue* is called.
QueueOutOfOrderExecboolIf true, the commands queued in the command-queue can be executed in-order or out-oforder.
QueueProfilingboolIf true, command queues support profiling.
VendorDewStringReturns the name of the Vendor.
VendorIDlong longReturns the value of the Vendor ID.

Methods

NameDescription
GetMaxWorkItemSizesMaximum number of work-items that can be specified in each dimension of the work-group.
Update