Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

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 };

  // public member functions
  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 & operator=(const command_queue &);
  command_queue(command_queue &&) noexcept;
  command_queue & operator=(command_queue &&) noexcept;
  ~command_queue();
  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;
  command_queue get_default_device_queue() const;
  void set_as_default_device_queue() 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());
  event enqueue_svm_migrate_memory(const std::vector< const void * > &, 
                                   const std::vector< size_t > &, 
                                   const cl_mem_migration_flags = 0, 
                                   const wait_list & = wait_list());
  event enqueue_svm_migrate_memory(const void *, const size_t = 0, 
                                   const cl_mem_migration_flags = 0, 
                                   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 member functions

  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

  4. command_queue(const command_queue & other);
    Creates a new command queue object as a copy of other.
  5. command_queue & operator=(const command_queue & other);
    Copies the command queue object from other to *this.
  6. command_queue(command_queue && other) noexcept;
    Move-constructs a new command queue object from other.
  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

  9. cl_command_queue & get() const;
    Returns the underlying OpenCL command queue.
  10. device get_device() const;
    Returns the device that the command queue issues commands to.
  11. context get_context() const;
    Returns the context for the command queue.
  12. template<typename T> T get_info(cl_command_queue_info info) const;

    Returns information about the command queue.

    See the documentation for

  13. 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.
  14. cl_command_queue_properties get_properties() const;
    Returns the properties for the command queue.
  15. command_queue get_default_device_queue() const;

    Returns the current default device command queue for the underlying device.

    [Warning] Warning

    This method is only available if the OpenCL version is 2.1 or later.

  16. void set_as_default_device_queue() const;

    Replaces the default device command queue for the underlying device with this command queue. Command queue must have been created with CL_QUEUE_ON_DEVICE flag.

    See the documentation for

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. 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.
  30. 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

  31. 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

  32. 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

  33. 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

  34. 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.
  35. 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

  36. 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.
  37. 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

  38. 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.
  39. 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.
  40. 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.
  41. 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

  42. 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.
  43. 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

  44. 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

  45. 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.
  46. 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

  47. 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

  48. 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

  49. 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.
  50. 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

  51. 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

  52. 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.
  53. 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.

  54. 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

  55. 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.
  56. 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.

  57. void flush();

    Flushes the command queue.

    See the documentation for

  58. void finish();

    Blocks until all outstanding commands in the queue have finished.

    See the documentation for

  59. void enqueue_barrier();
    Enqueues a barrier in the queue.
  60. event enqueue_barrier(const wait_list & events);

    Enqueues a barrier in the queue after events.

    [Warning] Warning

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

  61. event enqueue_marker();

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

  62. 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] Warning

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

  63. 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] Warning

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

    See the documentation for

  64. 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] Warning

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

    See the documentation for

  65. 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] Warning

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

    See the documentation for

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

    Enqueues a command to free svm_ptr.

    [Warning] Warning

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

    See the documentation for

  67. 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] Warning

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

    See the documentation for

  68. 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] Warning

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

    See the documentation for

  69. event enqueue_svm_migrate_memory(const std::vector< const void * > & svm_ptrs, 
                                     const std::vector< size_t > & sizes, 
                                     const cl_mem_migration_flags flags = 0, 
                                     const wait_list & events = wait_list());

    Enqueues a command to indicate which device a set of ranges of SVM allocations should be associated with. The pair svm_ptrs[i] and sizes[i] together define the starting address and number of bytes in a range to be migrated.

    If sizes is empty, then that means every allocation containing any svm_ptrs[i] is to be migrated. Also, if sizes[i] is zero, then the entire allocation containing svm_ptrs[i] is migrated.

    [Warning] Warning

    This method is only available if the OpenCL version is 2.1 or later.

    See the documentation for

  70. event enqueue_svm_migrate_memory(const void * svm_ptr, const size_t size = 0, 
                                     const cl_mem_migration_flags flags = 0, 
                                     const wait_list & events = wait_list());

    Enqueues a command to indicate which device a range of SVM allocation should be associated with. The pair svm_ptr and size together define the starting address and number of bytes in a range to be migrated.

    If size is 0, then the entire allocation containing svm_ptr is migrated. The default value for size is 0.

    [Warning] Warning

    This method is only available if the OpenCL version is 2.1 or later.

    See the documentation for

  71. bool operator==(const command_queue & other) const;
    Returns true if the command queue is the same at other.
  72. bool operator!=(const command_queue & other) const;
    Returns true if the command queue is different from other.

PrevUpHomeNext