OCLEngine¶
Defined in common/oclengine.hpp.
This provides a basic interface with a wide-ranging set of functionality.
-
class
Qrack
::
OCLEngine
¶ “Qrack::OCLEngine” manages the single OpenCL context.
Creating an OCLEngine¶
OCLEngine is a singleton class that manages all OpenCL devices and supported objects, for use in QEngineOCL
and QEngineOCLMulti
.
Configuration Methods¶
-
DeviceContextPtr
Qrack::OCLEngine
::
GetDeviceContextPtr
(const int &dev = -1)¶ Get a pointer one of the available OpenCL contexts, by its index in the list of all contexts.
“Qrack::OCLEngine” manages the single OpenCL context
-
std::vector<DeviceContextPtr>
Qrack::OCLEngine
::
GetDeviceContextPtrVector
()¶ Get the list of all available devices (and their supporting objects).
-
void
Qrack::OCLEngine
::
SetDeviceContextPtrVector
(std::vector<DeviceContextPtr> vec, DeviceContextPtr dcp = nullptr)¶ Set the list of DeviceContextPtr object available for use.
If one takes the result of GetDeviceContextPtrVector(), trims items from it, and sets it with this method, (at initialization, before any QEngine objects depend on them,) all resources associated with the removed items are freed.