#include <opencl_context.h>
This contains an OpenCL context. This is a very basic class that simply maintains ownership over an underlying context along with providing basic information about it such as the list of devices associated with it. This class in turn is used by other OpenCL classes that derive from an OpenCL context.
◆ Context()
Context::Context |
( |
const QList< Device *> & |
devices, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs a new OpenCL context with the given list of devices and optional parent. If the given device list is empty or all devices are not part of the same platform then an exception is thrown.
- Parameters
-
devices | List of pointers to devices this context is created from. All devices must be part of the given platform. |
parent | Optional parent for this new context. |
◆ ~Context()
Releases the underlying OpenCL context that this object represents.
◆ devices()
const QList< Device * > & Context::devices |
( |
| ) |
const |
Returns a read only reference to the list of device pointers which is part of this context.
- Returns
- Read only reference to list of devices of this context.
◆ id()
cl_context Context::id |
( |
| ) |
const |
Returns the OpenCL context ID of this object.
- Returns
- OpenCL context ID of this object.
The documentation for this class was generated from the following files: