opencl Creating a command queue


Example

To initiate any operation on your devices, you'll need a command queue for each device. The Queue keeps track of different calls you did to the target device and keeps them in order. Most commands can also be executed either in blocking or non-blocking mode.

Creating a queue is pretty straightforward:

_queue = Cl.CreateCommandQueue(_context, _device, CommandQueueProperties.None, out err);

The basic interaction with your command queue is to enqueue different operations you want to perform, e.g. copy data to and from your device and launch a kernel.

When you have finished using the command queue you need to release the queue with a call to

Cl.ReleaseCommandQueue(_queue);