From 5a4ac9133baa81c97e01639b3fd53aa49767aa4a Mon Sep 17 00:00:00 2001 From: Gordon Brown Date: Fri, 19 Apr 2024 14:16:06 +0100 Subject: [PATCH 1/3] Clarifications to class availability section * Added sections to buffer and image section for the buffer_allocator and image_allocator classes. * Fixed links to buffer_allocator, image_allocator, exception, device_event, kernel_id, reducer, marray and vec. --- source/class-availability.rst | 34 +++++++++++++--------------- source/iface/buffer.rst | 23 +++++++++++++++++++ source/iface/exception.rst | 2 ++ source/iface/image.rst | 14 ++++++++++++ source/iface/reduction-variables.rst | 2 ++ 5 files changed, 57 insertions(+), 18 deletions(-) diff --git a/source/class-availability.rst b/source/class-availability.rst index 390a0921..0657afaa 100644 --- a/source/class-availability.rst +++ b/source/class-availability.rst @@ -6,27 +6,25 @@ Class availability ****************** -In SYCL some SYCL runtime classes are available to -the SYCL application, some are available within a -SYCL kernel function and some are available on both -and can be passed as arguments to a SYCL kernel function. +In SYCL some SYCL runtime classes are available to the SYCL application, some +are available within a SYCL kernel function and some are available on both and +can be passed as arguments to a SYCL kernel function. -Each of the following SYCL runtime classes must be -available to the host application: :ref:`buffer`, -``sycl::buffer_allocator``, :ref:`context`, :ref:`device`, -:ref:`device_image`, :ref:`event`, `exception`, :ref:`handler`, -:ref:`host_accessor`, :ref:`host_sampled_image_accessor`, -:ref:`host_unsampled_image_accessor`, :ref:`id`, ``sycl::image_allocator``, -:ref:`kernel`, ``sycl::kernel_id``, `marray`, `kernel_bundle`, +Each of the following SYCL runtime classes must be available to the host +application: :ref:`buffer`, :ref:`buffer_allocator`, :ref:`context`, +:ref:`device`, :ref:`device_image`, :ref:`event`, :ref:`exception`, +:ref:`handler`, :ref:`host_accessor`, :ref:`host_sampled_image_accessor`, +:ref:`host_unsampled_image_accessor`, :ref:`id`, :ref:`image_allocator`, +:ref:`kernel`, :ref:`kernel_id`, :ref:`marray`, `kernel_bundle`, :ref:`nd_range`, :ref:`platform`, :ref:`queue`, :ref:`range`, :ref:`sampled_image`, :ref:`image_sampler`, :ref:`stream`, -:ref:`unsampled_image` and `vec`. +:ref:`unsampled_image` and :ref:`vec`. -Each of the following SYCL runtime classes must be available -within a SYCL kernel function: :ref:`command-accessor`, :ref:`atomic_ref`, -``sycl::device_event``, :ref:`group`, :ref:`h_item`, :ref:`id`, :ref:`item`, -:ref:`local_accessor`, `marray`, :ref:`multi_ptr`, :ref:`nd_item`, -:ref:`range`, `reducer`, :ref:`sampled_image_accessor`, :ref:`stream`, -:ref:`sub_group`, :ref:`unsampled_image_accessor` and `vec`. +Each of the following SYCL runtime classes must be available within a SYCL +kernel function: :ref:`command-accessor`, :ref:`atomic_ref`, +:ref:`device_event`, :ref:`group`, :ref:`h_item`, :ref:`id`, :ref:`item`, +:ref:`local_accessor`, :ref:`marray`, :ref:`multi_ptr`, :ref:`nd_item`, +:ref:`range`, :ref:`reducer`, :ref:`sampled_image_accessor`, :ref:`stream`, +:ref:`sub_group`, :ref:`unsampled_image_accessor` and :ref:`vec`. .. seealso:: |SYCL_SPEC_CLASS_AVLBL| diff --git a/source/iface/buffer.rst b/source/iface/buffer.rst index 2106e108..431b8d8a 100644 --- a/source/iface/buffer.rst +++ b/source/iface/buffer.rst @@ -8,6 +8,29 @@ Buffers ******* +.. _buffer_allocator: + +========================== +``sycl::buffer_allocator`` +========================== + +:: + + template + class buffer_allocator; + +.. rubric:: Template parameters + +================ ========== +``T`` Type of data in to be allocated. +================ ========== + +The ``sycl::buffer_allocator`` class dfefines the default allocator that will be +used by a ``sycl::buffer`` when one is not provided by the user. +The ``sycl::buffer_allocator`` class meets the C++ named requirement Allocator. +A ``sycl::buffer`` of data type ``const T`` will use ``sycl::buffer_allocator`` +by default. + .. _buffer: ================ diff --git a/source/iface/exception.rst b/source/iface/exception.rst index c1bc3e89..93988e62 100644 --- a/source/iface/exception.rst +++ b/source/iface/exception.rst @@ -8,6 +8,8 @@ Exceptions ********** +.. _exception: + =================== ``sycl::exception`` =================== diff --git a/source/iface/image.rst b/source/iface/image.rst index 92e3d18d..b3c98d15 100644 --- a/source/iface/image.rst +++ b/source/iface/image.rst @@ -29,6 +29,20 @@ provide the :ref:`common-reference`. .. seealso:: |SYCL_SPEC_IMAGE| +.. _image_allocator: + +========================== +``sycl::image_allocator`` +========================== + +:: + + class image_allocator; + +The ``sycl::image_allocator`` class dfefines the default allocator that will be +used by a ``sycl::unsampled_buffer`` or ``sycl::sampled_buffer`` when one is not +provided by the user. The ``sycl::image_allocator`` allocates in elements of +``std::byte``. .. _unsampled_image: diff --git a/source/iface/reduction-variables.rst b/source/iface/reduction-variables.rst index 27efc1bc..deb8d109 100644 --- a/source/iface/reduction-variables.rst +++ b/source/iface/reduction-variables.rst @@ -319,6 +319,8 @@ Constructors of the ``reduction property`` classes Constructs an initialize_to_identity property instance. +.. _reducer: + ``reducer class`` ================= From f3e84bc76820f554502391eacde2299007435865 Mon Sep 17 00:00:00 2001 From: Gordon Brown Date: Fri, 19 Apr 2024 15:41:54 +0100 Subject: [PATCH 2/3] Update source/iface/image.rst Co-authored-by: Greg Lueck --- source/iface/image.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/iface/image.rst b/source/iface/image.rst index b3c98d15..870677b7 100644 --- a/source/iface/image.rst +++ b/source/iface/image.rst @@ -39,7 +39,7 @@ provide the :ref:`common-reference`. class image_allocator; -The ``sycl::image_allocator`` class dfefines the default allocator that will be +The ``sycl::image_allocator`` class defines the default allocator that will be used by a ``sycl::unsampled_buffer`` or ``sycl::sampled_buffer`` when one is not provided by the user. The ``sycl::image_allocator`` allocates in elements of ``std::byte``. From 88db5d41e4ceb450d15ed2baf0bb3a176743b494 Mon Sep 17 00:00:00 2001 From: Gordon Brown Date: Fri, 19 Apr 2024 15:42:00 +0100 Subject: [PATCH 3/3] Update source/iface/buffer.rst Co-authored-by: Greg Lueck --- source/iface/buffer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/iface/buffer.rst b/source/iface/buffer.rst index 431b8d8a..97c96940 100644 --- a/source/iface/buffer.rst +++ b/source/iface/buffer.rst @@ -25,7 +25,7 @@ Buffers ``T`` Type of data in to be allocated. ================ ========== -The ``sycl::buffer_allocator`` class dfefines the default allocator that will be +The ``sycl::buffer_allocator`` class defines the default allocator that will be used by a ``sycl::buffer`` when one is not provided by the user. The ``sycl::buffer_allocator`` class meets the C++ named requirement Allocator. A ``sycl::buffer`` of data type ``const T`` will use ``sycl::buffer_allocator``