A command queue Command queues provide the interface for interacting with compute devices. The command_queue class provides methods to copy data to and from a compute device as well as execute compute kernels. Command queues are created for one or more compute devices within a compute context. For example, to create a queue for the default GPU on the system: // get the default GPU device boost::compute::device gpu = boost::compute::system::default_gpu_device(); // create a context for the GPU device boost::compute::context context(gpu); // create a command queue for the GPU device boost::compute::command_queue queue(context, gpu); The command_queue class provides the low-level methods for controlling a compute device. The high-level STL-style algorithms provide an easier to use interface for much of this functionality. copy() fill() See also: context, device, buffer, kernel const context& const device& const cl_command_queue_properties* 0 Creates a new command queue object in context for device with properties. cl_command_queue bool true Creates a new command queue object for queue. If retain is true (the default) the reference count for queue will be incremented. const command_queue & Creates a new command queue object as a copy of other. const command_queue & Copies the command queue from other. Destroys the command queue object. device Returns the device that the command queue issues instructions to. context Returns the context for the command queue. cl_command_queue_properties Returns the properties for the command queue. The returned cl_command_queue_properties type is a bitfield containing the state of each property flag. For example, to check if the command queue supports event profiling: if(queue.get_properties() & command_queue::enable_profiling){ // use event profiling info } T cl_command_queue_info Returns information about the command queue. void const buffer& size_t size_t void * Enqueues a command to read from a device buffer to host memory. See also: copy() void const buffer& size_t size_t const void * Enqueues a command to write to a device buffer from host memory. See also: copy() void const buffer& const buffer& size_t size_t size_t Enqueues a command to copy data from src_buffer to dst_buffer. See also: copy() event const kernel& size_t const size_t* const size_t* const size_t* Enqueues kernel for execution on the device. void const kernel& Enqueues kernel for serial execution on the device using a single work-item. void Flushes the command queue. void Blocks until all outstanding operations are completed. void Enqueues a barrier in the command queue. event Enqueues a marker in the command queue.