Defined in common/oclengine.hpp.
This provides a basic interface with a wide-ranging set of functionality.
“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
GetDeviceContextPtr(const int64_t &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
Get the list of all available devices (and their supporting objects).
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.