Class command_queue

| Home | Libraries | People | FAQ | More

## Class command_queue

boost::compute::command_queue — A command queue.

## Synopsis

    // In header: <boost/compute/command_queue.hpp>

    class command_queue {
    public:

      enum properties { enable_profiling = = CL_QUEUE_PROFILING_ENABLE,
                        enable_out_of_order_execution = = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE };

      enum map_flags { map_read = = CL_MAP_READ, map_write = = CL_MAP_WRITE };
      // construct/copy/destruct
      command_queue();
      explicit command_queue(cl_command_queue, bool = true);
      command_queue(const context &, const device &,
                    cl_command_queue_properties = 0);
      command_queue(const command_queue &);
      command_queue(command_queue &&) noexcept;
      command_queue & operator=(const command_queue &);
      command_queue & operator=(command_queue &&) noexcept;
      ~command_queue();

      // public member functions
      cl_command_queue & get() const;
      device get_device() const;
      context get_context() const;
      template<typename T> T get_info(cl_command_queue_info) const;
      template<int Enum> unspecified get_info() const;
      cl_command_queue_properties get_properties() const;
      event enqueue_read_buffer(const buffer &, size_t, size_t, void *,
                                const wait_list & = wait_list());
      event enqueue_read_buffer_async(const buffer &, size_t, size_t, void *,
                                      const wait_list & = wait_list());
      event enqueue_read_buffer_rect(const buffer &, const size_t, const size_t,
                                     const size_t, size_t, size_t, size_t,
                                     size_t, void *,
                                     const wait_list & = wait_list());
      event enqueue_read_buffer_rect_async(const buffer &, const size_t,
                                           const size_t, const size_t, size_t,
                                           size_t, size_t, size_t, void *,
                                           const wait_list & = wait_list());
      event enqueue_write_buffer(const buffer &, size_t, size_t, const void *,
                                 const wait_list & = wait_list());
      event enqueue_write_buffer_async(const buffer &, size_t, size_t,
                                       const void *,
                                       const wait_list & = wait_list());
      event enqueue_write_buffer_rect(const buffer &, const size_t, const size_t,
                                      const size_t, size_t, size_t, size_t,
                                      size_t, void *,
                                      const wait_list & = wait_list());
      event enqueue_write_buffer_rect_async(const buffer &, const size_t,
                                            const size_t, const size_t, size_t,
                                            size_t, size_t, size_t, void *,
                                            const wait_list & = wait_list());
      event enqueue_copy_buffer(const buffer &, const buffer &, size_t, size_t,
                                size_t, const wait_list & = wait_list());
      event enqueue_copy_buffer_rect(const buffer &, const buffer &, const size_t,
                                     const size_t, const size_t, size_t, size_t,
                                     size_t, size_t,
                                     const wait_list & = wait_list());
      event enqueue_fill_buffer(const buffer &, const void *, size_t, size_t,
                                size_t, const wait_list & = wait_list());
      void * enqueue_map_buffer(const buffer &, cl_map_flags, size_t, size_t,
                                event &, const wait_list & = wait_list());
      void * enqueue_map_buffer(const buffer &, cl_map_flags, size_t, size_t,
                                const wait_list & = wait_list());
      void * enqueue_map_buffer_async(const buffer &, cl_map_flags, size_t,
                                      size_t, event &,
                                      const wait_list & = wait_list());
      event enqueue_unmap_buffer(const buffer &, void *,
                                 const wait_list & = wait_list());
      event enqueue_unmap_mem_object(cl_mem, void *,
                                     const wait_list & = wait_list());
      event enqueue_read_image(const image_object &, const size_t *,
                               const size_t *, size_t, size_t, void *,
                               const wait_list & = wait_list());
      template<size_t N>
        event enqueue_read_image(const image_object &, const extents< N >,
                                 const extents< N >, void *, size_t = 0,
                                 size_t = 0, const wait_list & = wait_list());
      event enqueue_write_image(image_object &, const size_t *, const size_t *,
                                const void *, size_t = 0, size_t = 0,
                                const wait_list & = wait_list());
      template<size_t N>
        event enqueue_write_image(image_object &, const extents< N >,
                                  const extents< N >, const void *,
                                  const size_t = 0, const size_t = 0,
                                  const wait_list & = wait_list());
      void * enqueue_map_image(const image_object &, cl_map_flags, const size_t *,
                               const size_t *, size_t &, size_t &, event &,
                               const wait_list & = wait_list());
      void * enqueue_map_image(const image_object &, cl_map_flags, const size_t *,
                               const size_t *, size_t &, size_t &,
                               const wait_list & = wait_list());
      template<size_t N>
        void * enqueue_map_image(image_object &, cl_map_flags, const extents< N >,
                                 const extents< N >, size_t &, size_t &, event &,
                                 const wait_list & = wait_list());
      template<size_t N>
        void * enqueue_map_image(image_object &, cl_map_flags, const extents< N >,
                                 const extents< N >, size_t &, size_t &,
                                 const wait_list & = wait_list());
      void * enqueue_map_image_async(const image_object &, cl_map_flags,
                                     const size_t *, const size_t *, size_t &,
                                     size_t &, event &,
                                     const wait_list & = wait_list());
      template<size_t N>
        void * enqueue_map_image_async(image_object &, cl_map_flags,
                                       const extents< N >, const extents< N >,
                                       size_t &, size_t &, event &,
                                       const wait_list & = wait_list());
      event enqueue_unmap_image(const image_object &, void *,
                                const wait_list & = wait_list());
      event enqueue_copy_image(const image_object &, image_object &,
                               const size_t *, const size_t *, const size_t *,
                               const wait_list & = wait_list());
      template<size_t N>
        event enqueue_copy_image(const image_object &, image_object &,
                                 const extents< N >, const extents< N >,
                                 const extents< N >,
                                 const wait_list & = wait_list());
      event enqueue_copy_image_to_buffer(const image_object &, memory_object &,
                                         const size_t *, const size_t *, size_t,
                                         const wait_list & = wait_list());
      event enqueue_copy_buffer_to_image(const memory_object &, image_object &,
                                         size_t, const size_t *, const size_t *,
                                         const wait_list & = wait_list());
      event enqueue_fill_image(image_object &, const void *, const size_t *,
                               const size_t *, const wait_list & = wait_list());
      template<size_t N>
        event enqueue_fill_image(image_object &, const void *, const extents< N >,
                                 const extents< N >,
                                 const wait_list & = wait_list());
      event enqueue_migrate_memory_objects(uint_, const cl_mem *,
                                           cl_mem_migration_flags,
                                           const wait_list & = wait_list());
      event enqueue_nd_range_kernel(const kernel &, size_t, const size_t *,
                                    const size_t *, const size_t *,
                                    const wait_list & = wait_list());
      template<size_t N>
        event enqueue_nd_range_kernel(const kernel &, const extents< N > &,
                                      const extents< N > &, const extents< N > &,
                                      const wait_list & = wait_list());
      event enqueue_1d_range_kernel(const kernel &, size_t, size_t, size_t,
                                    const wait_list & = wait_list());
      event enqueue_task(const kernel &, const wait_list & = wait_list());
      event enqueue_native_kernel(void(BOOST_COMPUTE_CL_CALLBACK *user_func)(void *),
                                  void *, size_t, uint_, const cl_mem *,
                                  const void **, const wait_list & = wait_list());
      event enqueue_native_kernel(void(BOOST_COMPUTE_CL_CALLBACK *user_func)(void),
                                  const wait_list & = wait_list());
      void flush();
      void finish();
      void enqueue_barrier();
      event enqueue_barrier(const wait_list &);
      event enqueue_marker();
      event enqueue_marker(const wait_list &);
      event enqueue_svm_memcpy(void *, const void *, size_t,
                               const wait_list & = wait_list());
      event enqueue_svm_memcpy_async(void *, const void *, size_t,
                                     const wait_list & = wait_list());
      event enqueue_svm_fill(void *, const void *, size_t, size_t,
                             const wait_list & = wait_list());
      event enqueue_svm_free(void *, const wait_list & = wait_list());
      event enqueue_svm_map(void *, size_t, cl_map_flags,
                            const wait_list & = wait_list());
      event enqueue_svm_unmap(void *, const wait_list & = wait_list());
      bool operator==(const command_queue &) const;
      bool operator!=(const command_queue &) const;
    };

## Description

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 a compute device within a compute context.

For example, to create a context and command queue for the default device on the system (this is the normal set up code used by almost all OpenCL programs):

    #include <boost/compute/core.hpp>

    // get the default compute device
    boost::compute::device device = boost::compute::system::default_device();

    // set up a compute context and command queue
    boost::compute::context context(device);
    boost::compute::command_queue queue(context, device);

The default command queue for the system can be obtained with the system::default_queue() method.

See Also:

buffer, context, kernel

### `command_queue` public construct/copy/destruct

1.     command_queue();

   Creates a null command queue.

2.     explicit command_queue(cl_command_queue queue, bool retain = true);

3.     command_queue(const context & context, const device & device,
                     cl_command_queue_properties properties = 0);

   Creates a command queue in `context` for `device` with `properties`.

   See the documentation for clCreateCommandQueue() for more information.

4.     command_queue(const command_queue & other);

   Creates a new command queue object as a copy of `other`.

5.     command_queue(command_queue && other) noexcept;

   Move-constructs a new command queue object from `other`.

6.     command_queue & operator=(const command_queue & other);

   Copies the command queue object from `other` to `*this`.

7.     command_queue & operator=(command_queue && other) noexcept;

   Move-assigns the command queue from `other` to `*this`.

8.     ~command_queue();

   Destroys the command queue.

   See the documentation for clReleaseCommandQueue() for more information.

### `command_queue` public member functions

1.     cl_command_queue & get() const;

   Returns the underlying OpenCL command queue.

2.     device get_device() const;

   Returns the device that the command queue issues commands to.

3.     context get_context() const;

   Returns the context for the command queue.

4.     template<typename T> T get_info(cl_command_queue_info info) const;

   Returns information about the command queue.

   See the documentation for clGetCommandQueueInfo() for more information.

5.     template<int Enum> unspecified get_info() const;

   This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

6.     cl_command_queue_properties get_properties() const;

   Returns the properties for the command queue.

7.     event enqueue_read_buffer(const buffer & buffer, size_t offset, size_t size,
                                 void * host_ptr,
                                 const wait_list & events = wait_list());

   Enqueues a command to read data from `buffer` to host memory.

   See the documentation for clEnqueueReadBuffer() for more information.

   See Also:

   copy()

8.     event enqueue_read_buffer_async(const buffer & buffer, size_t offset,
                                       size_t size, void * host_ptr,
                                       const wait_list & events = wait_list());

   Enqueues a command to read data from `buffer` to host memory. The copy will be performed asynchronously.

   See the documentation for clEnqueueReadBuffer() for more information.

   See Also:

   copy_async()

9.     event enqueue_read_buffer_rect(const buffer & buffer,
                                      const size_t buffer_origin,
                                      const size_t host_origin, const size_t region,
                                      size_t buffer_row_pitch,
                                      size_t buffer_slice_pitch,
                                      size_t host_row_pitch,
                                      size_t host_slice_pitch, void * host_ptr,
                                      const wait_list & events = wait_list());

   Enqueues a command to read a rectangular region from `buffer` to host memory.

   See the documentation for clEnqueueReadBufferRect() for more information.

   | Warning
   This method is only available if the OpenCL version is 1.1 or later.

10.     event enqueue_read_buffer_rect_async(const buffer & buffer,
                                             const size_t buffer_origin,
                                             const size_t host_origin,
                                             const size_t region,
                                             size_t buffer_row_pitch,
                                             size_t buffer_slice_pitch,
                                             size_t host_row_pitch,
                                             size_t host_slice_pitch,
                                             void * host_ptr,
                                             const wait_list & events = wait_list());

    Enqueues a command to read a rectangular region from `buffer` to host memory. The copy will be performed asynchronously.

    See the documentation for clEnqueueReadBufferRect() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.1 or later.

11.     event enqueue_write_buffer(const buffer & buffer, size_t offset, size_t size,
                                   const void * host_ptr,
                                   const wait_list & events = wait_list());

    Enqueues a command to write data from host memory to `buffer`.

    See the documentation for clEnqueueWriteBuffer() for more information.

    See Also:

    copy()

12.     event enqueue_write_buffer_async(const buffer & buffer, size_t offset,
                                         size_t size, const void * host_ptr,
                                         const wait_list & events = wait_list());

    Enqueues a command to write data from host memory to `buffer`. The copy is performed asynchronously.

    See the documentation for clEnqueueWriteBuffer() for more information.

    See Also:

    copy_async()

13.     event enqueue_write_buffer_rect(const buffer & buffer,
                                        const size_t buffer_origin,
                                        const size_t host_origin,
                                        const size_t region, size_t buffer_row_pitch,
                                        size_t buffer_slice_pitch,
                                        size_t host_row_pitch,
                                        size_t host_slice_pitch, void * host_ptr,
                                        const wait_list & events = wait_list());

    Enqueues a command to write a rectangular region from host memory to `buffer`.

    See the documentation for clEnqueueWriteBufferRect() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.1 or later.

14.     event enqueue_write_buffer_rect_async(const buffer & buffer,
                                              const size_t buffer_origin,
                                              const size_t host_origin,
                                              const size_t region,
                                              size_t buffer_row_pitch,
                                              size_t buffer_slice_pitch,
                                              size_t host_row_pitch,
                                              size_t host_slice_pitch,
                                              void * host_ptr,
                                              const wait_list & events = wait_list());

    Enqueues a command to write a rectangular region from host memory to `buffer`. The copy is performed asynchronously.

    See the documentation for clEnqueueWriteBufferRect() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.1 or later.

15.     event enqueue_copy_buffer(const buffer & src_buffer,
                                  const buffer & dst_buffer, size_t src_offset,
                                  size_t dst_offset, size_t size,
                                  const wait_list & events = wait_list());

    Enqueues a command to copy data from `src_buffer` to `dst_buffer`.

    See the documentation for clEnqueueCopyBuffer() for more information.

    See Also:

    copy()

16.     event enqueue_copy_buffer_rect(const buffer & src_buffer,
                                       const buffer & dst_buffer,
                                       const size_t src_origin,
                                       const size_t dst_origin, const size_t region,
                                       size_t buffer_row_pitch,
                                       size_t buffer_slice_pitch,
                                       size_t host_row_pitch,
                                       size_t host_slice_pitch,
                                       const wait_list & events = wait_list());

    Enqueues a command to copy a rectangular region from `src_buffer` to `dst_buffer`.

    See the documentation for clEnqueueCopyBufferRect() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.1 or later.

17.     event enqueue_fill_buffer(const buffer & buffer, const void * pattern,
                                  size_t pattern_size, size_t offset, size_t size,
                                  const wait_list & events = wait_list());

    Enqueues a command to fill `buffer` with `pattern`.

    See the documentation for clEnqueueFillBuffer() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.2 or later.

    See Also:

    fill()

18.     void * enqueue_map_buffer(const buffer & buffer, cl_map_flags flags,
                                  size_t offset, size_t size,
                                  event & map_buffer_event,
                                  const wait_list & events = wait_list());

    Enqueues a command to map `buffer` into the host address space. Event associated with map operation is returned through `map_buffer_event` parameter.

    See the documentation for clEnqueueMapBuffer() for more information.

19.     void * enqueue_map_buffer(const buffer & buffer, cl_map_flags flags,
                                  size_t offset, size_t size,
                                  const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

20.     void * enqueue_map_buffer_async(const buffer & buffer, cl_map_flags flags,
                                        size_t offset, size_t size,
                                        event & map_buffer_event,
                                        const wait_list & events = wait_list());

    Enqueues a command to map `buffer` into the host address space. Map operation is performed asynchronously. The pointer to the mapped region cannot be used until the map operation has completed.

    Event associated with map operation is returned through `map_buffer_event` parameter.

    See the documentation for clEnqueueMapBuffer() for more information.

21.     event enqueue_unmap_buffer(const buffer & buffer, void * mapped_ptr,
                                   const wait_list & events = wait_list());

    Enqueues a command to unmap `buffer` from the host memory space.

    See the documentation for clEnqueueUnmapMemObject() for more information.

22.     event enqueue_unmap_mem_object(cl_mem mem, void * mapped_ptr,
                                       const wait_list & events = wait_list());

    Enqueues a command to unmap `mem` from the host memory space.

    See the documentation for clEnqueueUnmapMemObject() for more information.

23.     event enqueue_read_image(const image_object & image, const size_t * origin,
                                 const size_t * region, size_t row_pitch,
                                 size_t slice_pitch, void * host_ptr,
                                 const wait_list & events = wait_list());

    Enqueues a command to read data from `image` to host memory.

    See the documentation for clEnqueueReadImage() for more information.

24.     template<size_t N>
          event enqueue_read_image(const image_object & image,
                                   const extents< N > origin,
                                   const extents< N > region, void * host_ptr,
                                   size_t row_pitch = 0, size_t slice_pitch = 0,
                                   const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

25.     event enqueue_write_image(image_object & image, const size_t * origin,
                                  const size_t * region, const void * host_ptr,
                                  size_t input_row_pitch = 0,
                                  size_t input_slice_pitch = 0,
                                  const wait_list & events = wait_list());

    Enqueues a command to write data from host memory to `image`.

    See the documentation for clEnqueueWriteImage() for more information.

26.     template<size_t N>
          event enqueue_write_image(image_object & image, const extents< N > origin,
                                    const extents< N > region, const void * host_ptr,
                                    const size_t input_row_pitch = 0,
                                    const size_t input_slice_pitch = 0,
                                    const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

27.     void * enqueue_map_image(const image_object & image, cl_map_flags flags,
                                 const size_t * origin, const size_t * region,
                                 size_t & output_row_pitch,
                                 size_t & output_slice_pitch,
                                 event & map_image_event,
                                 const wait_list & events = wait_list());

    Enqueues a command to map `image` into the host address space.

    Event associated with map operation is returned through `map_image_event` parameter.

    See the documentation for clEnqueueMapImage() for more information.

28.     void * enqueue_map_image(const image_object & image, cl_map_flags flags,
                                 const size_t * origin, const size_t * region,
                                 size_t & output_row_pitch,
                                 size_t & output_slice_pitch,
                                 const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

29.     template<size_t N>
          void * enqueue_map_image(image_object & image, cl_map_flags flags,
                                   const extents< N > origin,
                                   const extents< N > region,
                                   size_t & output_row_pitch,
                                   size_t & output_slice_pitch,
                                   event & map_image_event,
                                   const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

30.     template<size_t N>
          void * enqueue_map_image(image_object & image, cl_map_flags flags,
                                   const extents< N > origin,
                                   const extents< N > region,
                                   size_t & output_row_pitch,
                                   size_t & output_slice_pitch,
                                   const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

31.     void * enqueue_map_image_async(const image_object & image, cl_map_flags flags,
                                       const size_t * origin, const size_t * region,
                                       size_t & output_row_pitch,
                                       size_t & output_slice_pitch,
                                       event & map_image_event,
                                       const wait_list & events = wait_list());

    Enqueues a command to map `image` into the host address space. Map operation is performed asynchronously. The pointer to the mapped region cannot be used until the map operation has completed.

    Event associated with map operation is returned through `map_image_event` parameter.

    See the documentation for clEnqueueMapImage() for more information.

32.     template<size_t N>
          void * enqueue_map_image_async(image_object & image, cl_map_flags flags,
                                         const extents< N > origin,
                                         const extents< N > region,
                                         size_t & output_row_pitch,
                                         size_t & output_slice_pitch,
                                         event & map_image_event,
                                         const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

33.     event enqueue_unmap_image(const image_object & image, void * mapped_ptr,
                                  const wait_list & events = wait_list());

    Enqueues a command to unmap `image` from the host memory space.

    See the documentation for clEnqueueUnmapMemObject() for more information.

34.     event enqueue_copy_image(const image_object & src_image,
                                 image_object & dst_image, const size_t * src_origin,
                                 const size_t * dst_origin, const size_t * region,
                                 const wait_list & events = wait_list());

    Enqueues a command to copy data from `src_image` to `dst_image`.

    See the documentation for clEnqueueCopyImage() for more information.

35.     template<size_t N>
          event enqueue_copy_image(const image_object & src_image,
                                   image_object & dst_image,
                                   const extents< N > src_origin,
                                   const extents< N > dst_origin,
                                   const extents< N > region,
                                   const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

36.     event enqueue_copy_image_to_buffer(const image_object & src_image,
                                           memory_object & dst_buffer,
                                           const size_t * src_origin,
                                           const size_t * region, size_t dst_offset,
                                           const wait_list & events = wait_list());

    Enqueues a command to copy data from `src_image` to `dst_buffer`.

    See the documentation for clEnqueueCopyImageToBuffer() for more information.

37.     event enqueue_copy_buffer_to_image(const memory_object & src_buffer,
                                           image_object & dst_image,
                                           size_t src_offset,
                                           const size_t * dst_origin,
                                           const size_t * region,
                                           const wait_list & events = wait_list());

    Enqueues a command to copy data from `src_buffer` to `dst_image`.

    See the documentation for clEnqueueCopyBufferToImage() for more information.

38.     event enqueue_fill_image(image_object & image, const void * fill_color,
                                 const size_t * origin, const size_t * region,
                                 const wait_list & events = wait_list());

    Enqueues a command to fill `image` with `fill_color`.

    See the documentation for clEnqueueFillImage() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.2 or later.

39.     template<size_t N>
          event enqueue_fill_image(image_object & image, const void * fill_color,
                                   const extents< N > origin,
                                   const extents< N > region,
                                   const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

40.     event enqueue_migrate_memory_objects(uint_ num_mem_objects,
                                             const cl_mem * mem_objects,
                                             cl_mem_migration_flags flags,
                                             const wait_list & events = wait_list());

    Enqueues a command to migrate `mem_objects`.

    See the documentation for clEnqueueMigrateMemObjects() for more information.

    | Warning
    This method is only available if the OpenCL version is 1.2 or later.

41.     event enqueue_nd_range_kernel(const kernel & kernel, size_t work_dim,
                                      const size_t * global_work_offset,
                                      const size_t * global_work_size,
                                      const size_t * local_work_size,
                                      const wait_list & events = wait_list());

    Enqueues a kernel for execution.

    See the documentation for clEnqueueNDRangeKernel() for more information.

42.     template<size_t N>
          event enqueue_nd_range_kernel(const kernel & kernel,
                                        const extents< N > & global_work_offset,
                                        const extents< N > & global_work_size,
                                        const extents< N > & local_work_size,
                                        const wait_list & events = wait_list());

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

43.     event enqueue_1d_range_kernel(const kernel & kernel,
                                      size_t global_work_offset,
                                      size_t global_work_size,
                                      size_t local_work_size,
                                      const wait_list & events = wait_list());

    Convenience method which calls enqueue_nd_range_kernel() with a one-dimensional range.

44.     event enqueue_task(const kernel & kernel,
                           const wait_list & events = wait_list());

    Enqueues a kernel to execute using a single work-item.

    See the documentation for clEnqueueTask() for more information.

45.     event enqueue_native_kernel(void(BOOST_COMPUTE_CL_CALLBACK *user_func)(void *),
                                    void * args, size_t cb_args,
                                    uint_ num_mem_objects, const cl_mem * mem_list,
                                    const void ** args_mem_loc,
                                    const wait_list & events = wait_list());

    Enqueues a function to execute on the host.

46.     event enqueue_native_kernel(void(BOOST_COMPUTE_CL_CALLBACK *user_func)(void),
                                    const wait_list & events = wait_list());

    Convenience overload for enqueue_native_kernel() which enqueues a native kernel on the host with a nullary function.

47.     void flush();

    Flushes the command queue.

    See the documentation for clFlush() for more information.

48.     void finish();

    Blocks until all outstanding commands in the queue have finished.

    See the documentation for clFinish() for more information.

49.     void enqueue_barrier();

    Enqueues a barrier in the queue.

50.     event enqueue_barrier(const wait_list & events);

    Enqueues a barrier in the queue after `events`.

    | Warning
    This method is only available if the OpenCL version is 1.2 or later.

51.     event enqueue_marker();

    Enqueues a marker in the queue and returns an event that can be used to track its progress.

52.     event enqueue_marker(const wait_list & events);

    Enqueues a marker after `events` in the queue and returns an event that can be used to track its progress.

    | Warning
    This method is only available if the OpenCL version is 1.2 or later.

53.     event enqueue_svm_memcpy(void * dst_ptr, const void * src_ptr, size_t size,
                                 const wait_list & events = wait_list());

    Enqueues a command to copy `size` bytes of data from `src_ptr` to `dst_ptr`.

    | Warning
    This method is only available if the OpenCL version is 2.0 or later.

    See the documentation for clEnqueueSVMMemcpy() for more information.

54.     event enqueue_svm_memcpy_async(void * dst_ptr, const void * src_ptr,
                                       size_t size,
                                       const wait_list & events = wait_list());

    Enqueues a command to copy `size` bytes of data from `src_ptr` to `dst_ptr`. The operation is performed asynchronously.

    | Warning
    This method is only available if the OpenCL version is 2.0 or later.

    See the documentation for clEnqueueSVMMemcpy() for more information.

55.     event enqueue_svm_fill(void * svm_ptr, const void * pattern,
                               size_t pattern_size, size_t size,
                               const wait_list & events = wait_list());

    Enqueues a command to fill `size` bytes of data at `svm_ptr` with `pattern`.

    | Warning
    This method is only available if the OpenCL version is 2.0 or later.

    See the documentation for clEnqueueSVMMemFill() for more information.

56.     event enqueue_svm_free(void * svm_ptr, const wait_list & events = wait_list());

    Enqueues a command to free `svm_ptr`.

    | Warning
    This method is only available if the OpenCL version is 2.0 or later.

    See the documentation for clEnqueueSVMFree() for more information.

    See Also:

    svm_free()

57.     event enqueue_svm_map(void * svm_ptr, size_t size, cl_map_flags flags,
                              const wait_list & events = wait_list());

    Enqueues a command to map `svm_ptr` to the host memory space.

    | Warning
    This method is only available if the OpenCL version is 2.0 or later.

    See the documentation for clEnqueueSVMMap() for more information.

58.     event enqueue_svm_unmap(void * svm_ptr,
                                const wait_list & events = wait_list());

    Enqueues a command to unmap `svm_ptr` from the host memory space.

    | Warning
    This method is only available if the OpenCL version is 2.0 or later.

    See the documentation for clEnqueueSVMUnmap() for more information.

59.     bool operator==(const command_queue & other) const;

    Returns `true` if the command queue is the same at `other`.

60.     bool operator!=(const command_queue & other) const;

    Returns `true` if the command queue is different from `other`.