@@ -24,9 +24,13 @@ iterators. However, they are indirectly device accessible because they represent
2424When passed to oneDPL algorithms with a ``device_policy ``, indirectly device accessible iterator types that are also
2525random access iterators and satisfy *SYCL device-copyable * must not cause unnecessary data movement beyond what is
2626required by the algorithm's semantics and what would be required to use the type directly within a SYCL kernel.
27- Indirectly device accessible buffer position objects must not cause unnecessary data movement beyond what is
28- required by the algorithm's semantics and what would be required by using an accessor to the buffer within a SYCL
29- kernel.
27+
28+ Similarly, when passed to oneDPL algorithms with a ``device_policy ``, buffer position objects must not cause
29+ unnecessary data movement beyond what is required by the algorithm's semantics and what would be required
30+ by using an accessor to the buffer within a SYCL kernel.
31+
32+ The same requirement to prevent excessive data movements equally applies to indirectly device accessible types
33+ composed of one or more source components, such as the oneDPL iterators.
3034
3135Indirect Device Accessibility Type Trait
3236^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -52,17 +56,20 @@ oneDPL Iterators
5256The oneDPL iterators are defined in the ``<oneapi/dpl/iterator> `` header,
5357in ``namespace oneapi::dpl ``.
5458
55- Let us define a named requirement, ``AdaptingIteratorSource ``, to describe valid random access iterator-like
59+ Let us define a named requirement, ``AdaptingIteratorSource ``, to describe random access iterator-like
5660types that can be used as source for oneDPL iterators as described below.
5761The type ``Iter `` satisfies the ``AdaptingIteratorSource `` named requirement if it is any of the following:
5862
5963* A random access iterator
60- * The unspecified iterator-like type returned by ``oneapi::dpl::begin `` or ``oneapi::dpl::end ``
6164* A ``permutation_iterator ``
6265* A ``transform_iterator ``
6366* A ``counting_iterator ``
6467* A ``discard_iterator ``
6568* A ``zip_iterator ``
69+ * A :doc: `buffer position object <buffer_wrappers >` type returned by ``oneapi::dpl::begin `` and ``oneapi::dpl::end ``
70+
71+ If ``AdaptingIteratorSource `` is a buffer wrapper, a type built upon that also becomes a buffer wrapper,
72+ not an iterator, and cannot be directly dereferenced (see :doc: `Buffer wrappers <buffer_wrappers >`).
6673
6774.. code :: cpp
6875
@@ -209,12 +216,15 @@ algorithm with a ``device_policy``, ``SourceIterator`` must be indirectly device
209216The type ``IndexMap `` must be one of the following:
210217
211218* A random access iterator
212- * The unspecified iterator-like type returned by ``oneapi::dpl::begin `` or ``oneapi::dpl::end ``
213219* A ``permutation_iterator ``
214220* A ``transform_iterator ``
215221* A ``counting_iterator ``
216222* A functor with a signature equivalent to ``T operator()(const T&) const `` where ``T `` is a
217223 ``std::iterator_traits<SourceIterator>::difference_type ``
224+ * A :doc: `buffer position object <buffer_wrappers >` type returned by ``oneapi::dpl::begin `` and ``oneapi::dpl::end ``
225+
226+ If the ``IndexMap `` is a buffer wrapper, the ``permutation_iterator `` built upon that will be a buffer wrapper, not an
227+ iterator, and cannot be directly dereferenced (see :doc: `Buffer wrappers <buffer_wrappers >`).
218228
219229``permutation_iterator::operator* `` uses the counter value of the instance on which
220230it is invoked to index into the index map. The corresponding value in the map is then used
0 commit comments