OpenCL interoperability namespace. More...
Functions | |
engine | make_engine (cl_device_id device, cl_context context) |
Constructs an engine from OpenCL device and context objects. More... | |
cl_context | get_context (const engine &aengine) |
Returns OpenCL context associated with the engine. More... | |
cl_device_id | get_device (const engine &aengine) |
Returns OpenCL device associated with the engine. More... | |
stream | make_stream (const engine &aengine, cl_command_queue queue) |
Constructs an execution stream for the specified engine and OpenCL queue. More... | |
cl_command_queue | get_command_queue (const stream &astream) |
Returns OpenCL queue object associated with the execution stream. More... | |
cl_mem | get_mem_object (const memory &amemory) |
Returns the OpenCL memory object associated with the memory object. More... | |
void | set_mem_object (memory &amemory, cl_mem mem_object) |
Sets the OpenCL memory object associated with the memory object. More... | |
OpenCL interoperability namespace.
|
inline |
Constructs an engine from OpenCL device and context objects.
device | The OpenCL device that this engine will encapsulate. |
context | The OpenCL context (containing the device) that this engine will use for all operations. |
|
inline |
Returns OpenCL context associated with the engine.
aengine | An engine. |
|
inline |
Returns OpenCL device associated with the engine.
aengine | An engine. |
Constructs an execution stream for the specified engine and OpenCL queue.
aengine | Engine to create the stream on. |
queue | OpenCL queue to use for the stream. |
|
inline |
Returns OpenCL queue object associated with the execution stream.
astream | An execution stream. |
|
inline |
Returns the OpenCL memory object associated with the memory object.
amemory | A memory object. |
|
inline |
Sets the OpenCL memory object associated with the memory object.
For behavioral details see memory::set_data_handle().
amemory | A memory object. |
mem_object | OpenCL cl_mem object to use as the underlying storage. It must have at least get_desc().get_size() bytes allocated. |