Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ruslan Arutyunyan <[email protected]>
  • Loading branch information
akukanov and rarutyun authored Oct 9, 2024
1 parent 0bc5af3 commit a3491cf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Buffer Wrappers
``oneapi::dpl::begin`` and ``oneapi::dpl::end`` are helper functions
for passing `SYCL`_ buffers to oneDPL algorithms.
These functions accept a SYCL buffer and return an object of an unspecified type
(referred below as *buffer position*) that satisfies the following requirements:
(referred below as *buffer position object*) that satisfies the following requirements:

- It is ``CopyConstructible`` and ``CopyAssignable``.
- It is comparable with operators ``==`` and ``!=``.
- It provides the ``get_buffer()`` method that returns the SYCL buffer, over which an object was built.
- It is comparable with ``operator==`` and ``operator!=``.
- It provides the ``get_buffer()`` method that returns the SYCL buffer, which an object was built over.
- The expressions ``a + n`` and ``a - n``, where ``a`` is a buffer position object and ``n``
is an integer value, are valid and evaluate to a buffer position object representing
a position in the buffer that follows or precedes the position of ``a`` by ``n``.
Expand All @@ -71,7 +71,7 @@ in expressions with other objects built over the same buffer.
namespace dpl = oneapi::dpl; // see "Namespaces"
sycl::buffer buf {/*...*/};
auto pos = dpl::find(dpl::execution::dpcpp_default, dpl::begin(buf), dpl::end(buf), value);
int value_index = (pos == dpl::end(buf))? -1 : pos - dpl::begin(buf);
int value_index = (pos == dpl::end(buf)) ? -1 : (pos - dpl::begin(buf));
SYCL deduction tags (the ``TagT`` parameters) and ``sycl::property::no_init``
allow to specify an access mode to be used by algorithms for accessing a SYCL buffer.
Expand Down

0 comments on commit a3491cf

Please sign in to comment.