#include <opencl_device.h>
This provides information about a single OpenCL device. This class is not intended to be instantiated on its own but instead queried through the platform class. Any pointer to a device the platform methods return will exist for the life time of the ACE program. This class also provides its underlying OpenCL device ID that is used by other OpenCL classes.
◆ Type
Defines the different OpenCL device types a device can be.
Enumerator |
---|
CPU | Defines the CPU device type.
Defines the GPU device type.
|
GPU | Defines the accelerator device type.
|
Accelerator | Defines the default device type.
|
◆ Device()
Device::Device |
( |
cl_device_id |
id, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs a new OpenCL device object with the given OpenCL device ID and optional parent.
- Parameters
-
id | OpenCL device ID used to construct this new device object. |
parent | Optional parent for this new object. |
◆ clockFrequency()
int Device::clockFrequency |
( |
| ) |
const |
Returns the maximum clock frequency for this device's hardware in megahertz. Usually in all modern GPU devices it can run at many different clock speeds.
- Returns
- Maximum clock frequency for this device's hardware in megahertz.
◆ computeUnitSize()
int Device::computeUnitSize |
( |
| ) |
const |
Returns the total number of compute units for this device's underlying hardware. In other words how many compute units can operate at any one time in parallel.
- Returns
- Total number of compute units for this device's hardware.
◆ extensions()
const QStringList & Device::extensions |
( |
| ) |
const |
Returns the OpenCL extensions supported by this device.
- Returns
- OpenCL extensions supported by this device.
◆ globalMemorySize()
qint64 Device::globalMemorySize |
( |
| ) |
const |
Returns the global memory size of this device in bytes.
- Returns
- Global memory size of this device in bytes.
◆ hasCompiler()
bool Device::hasCompiler |
( |
| ) |
const |
Indicates if this device has the ability to compile OpenCL kernel code.
- Returns
- True if this device can compile kernel code or false otherwise.
◆ id()
cl_device_id Device::id |
( |
| ) |
const |
Returns the OpenCL device ID for this device object.
- Returns
- OpenCL device ID for this object.
◆ isAvailable()
bool Device::isAvailable |
( |
| ) |
const |
Indicates if this device object is available for use with OpenCL.
- Returns
- True if this device is available or false otherwise.
◆ localMemorySize()
qint64 Device::localMemorySize |
( |
| ) |
const |
Returns the local memory size of this device in bytes.
- Returns
- Local memory size of this device in bytes.
◆ name()
QString Device::name |
( |
| ) |
const |
Returns the name of this device.
- Returns
- Name of this device.
◆ platform()
cl_platform_id Device::platform |
( |
| ) |
const |
Returns the OpenCL platform ID that this device belongs to.
- Returns
- OpenCL platform ID of this device.
◆ type()
Returns the OpenCL device type of this device.
- Returns
- OpenCL device type of this device.
The documentation for this class was generated from the following files: