@@ -17,7 +17,7 @@ a set of non-standard parallel algorithms.
17
17
18
18
parallel_api/execution_policies.rst
19
19
20
- Buffer wrappers
20
+ Buffer Wrappers
21
21
+++++++++++++++
22
22
23
23
.. code :: cpp
@@ -89,8 +89,8 @@ for ``begin`` and ``end``. Otherwise, the behavior is undefined.
89
89
Iterators
90
90
+++++++++
91
91
92
- The oneDPL iterators are defined in the :code: ` <oneapi/dpl/iterator> ` header,
93
- in :code: ` namespace oneapi::dpl `.
92
+ The oneDPL iterators are defined in the `` <oneapi/dpl/iterator> ` ` header,
93
+ in `` namespace oneapi::dpl ` `.
94
94
95
95
.. code :: cpp
96
96
@@ -129,10 +129,10 @@ in :code:`namespace oneapi::dpl`.
129
129
bool operator>=(const counting_iterator& it) const;
130
130
};
131
131
132
- :code: ` counting_iterator ` is a random access iterator-like type that represents an integer counter.
133
- When dereferenced, :code: ` counting_iterator ` provides an Integral rvalue equal to the value of the
132
+ `` counting_iterator ` ` is a random access iterator-like type that represents an integer counter.
133
+ When dereferenced, `` counting_iterator ` ` provides an Integral rvalue equal to the value of the
134
134
counter; dereference operations cannot be used to modify the counter. The arithmetic and comparison
135
- operators of :code: ` counting_iterator ` behave as if applied to the values of Integral type
135
+ operators of `` counting_iterator ` ` behave as if applied to the values of Integral type
136
136
representing the counters of the iterator instances passed to the operators.
137
137
138
138
.. code :: cpp
@@ -169,10 +169,10 @@ representing the counters of the iterator instances passed to the operators.
169
169
bool operator>(const discard_iterator& it) const;
170
170
};
171
171
172
- :code: ` discard_iterator ` is a random access iterator-like type that, when dereferenced, provides an
172
+ `` discard_iterator ` ` is a random access iterator-like type that, when dereferenced, provides an
173
173
lvalue that may be assigned an arbitrary value. The assignment has no effect on the
174
- :code: ` discard_iterator ` instance; the write is discarded. The arithmetic and comparison operators
175
- of :code: ` discard_iterator ` behave as if applied to integer counter values maintained by the
174
+ `` discard_iterator ` ` instance; the write is discarded. The arithmetic and comparison operators
175
+ of `` discard_iterator ` ` behave as if applied to integer counter values maintained by the
176
176
iterator instances to determine their position relative to each other.
177
177
178
178
.. code :: cpp
@@ -216,19 +216,19 @@ iterator instances to determine their position relative to each other.
216
216
bool operator>=(const permutation_iterator& it) const;
217
217
};
218
218
219
- :code: ` permutation_iterator ` is a random access iterator-like type whose dereferenced value set is
219
+ `` permutation_iterator ` ` is a random access iterator-like type whose dereferenced value set is
220
220
defined by the source iterator provided, and whose iteration order over the dereferenced value set
221
- is defined by either another iterator or a functor that maps the :code: ` permutation_iterator ` index
221
+ is defined by either another iterator or a functor that maps the `` permutation_iterator ` ` index
222
222
to the index of the source iterator. The arithmetic and comparison operators of
223
- :code: ` permutation_iterator ` behave as if applied to integer counter values maintained by the
223
+ `` permutation_iterator ` ` behave as if applied to integer counter values maintained by the
224
224
iterator instances to determine their position in the index map.
225
225
226
- :code: ` permutation_iterator::operator* ` uses the counter value of the instance on which
226
+ `` permutation_iterator::operator* ` ` uses the counter value of the instance on which
227
227
it is invoked to index into the index map. The corresponding value in the map is then used
228
228
to index into the value set defined by the source iterator. The resulting lvalue is returned
229
229
as the result of the operator.
230
230
231
- :code: ` permutation_iterator::operator[] ` uses the parameter :code: ` i `
231
+ `` permutation_iterator::operator[] `` uses the parameter `` i ``
232
232
to index into the index map. The corresponding value in the map is then used
233
233
to index into the value set defined by the source iterator. The resulting lvalue is returned
234
234
as the result of the operator.
@@ -239,7 +239,7 @@ as the result of the operator.
239
239
permutation_iterator<SourceIterator, IndexMap>
240
240
make_permutation_iterator(SourceIterator source, IndexMap map);
241
241
242
- :code: ` make_permutation_iterator ` constructs and returns an instance of :code: ` permutation_iterator `
242
+ `` make_permutation_iterator `` constructs and returns an instance of `` permutation_iterator ` `
243
243
using the source iterator and index map provided.
244
244
245
245
.. code :: cpp
@@ -284,12 +284,12 @@ using the source iterator and index map provided.
284
284
bool operator>=(const transform_iterator& it) const;
285
285
};
286
286
287
- :code: ` transform_iterator ` is a random access iterator-like type whose dereferenced value set is
287
+ `` transform_iterator ` ` is a random access iterator-like type whose dereferenced value set is
288
288
defined by the unary function and source iterator provided. When dereferenced,
289
- :code: ` transform_iterator ` provides the result of the unary function applied to the corresponding
289
+ `` transform_iterator ` ` provides the result of the unary function applied to the corresponding
290
290
element of the source iterator; dereference operations cannot be used to modify the elements of
291
291
the source iterator unless the unary function result includes a reference to the element. The
292
- arithmetic and comparison operators of :code: ` transform_iterator ` behave as if applied to the
292
+ arithmetic and comparison operators of `` transform_iterator ` ` behave as if applied to the
293
293
source iterator itself.
294
294
295
295
.. code :: cpp
@@ -298,7 +298,7 @@ source iterator itself.
298
298
transform_iterator<UnaryFunc, Iterator>
299
299
make_transform_iterator(Iterator, UnaryFunc);
300
300
301
- :code: ` make_transform_iterator ` constructs and returns an instance of :code: ` transform_iterator `
301
+ `` make_transform_iterator `` constructs and returns an instance of `` transform_iterator ` `
302
302
using the source iterator and unary function object provided.
303
303
304
304
.. code :: cpp
@@ -344,10 +344,10 @@ using the source iterator and unary function object provided.
344
344
bool operator>=(const zip_iterator& it) const;
345
345
};
346
346
347
- :code: ` zip_iterator ` is an iterator-like type defined over one or more iterators. When dereferenced,
348
- the value returned from :code: ` zip_iterator ` is a tuple of the values returned by dereferencing the
349
- source iterators over which the :code: ` zip_iterator ` is defined. The arithmetic operators of
350
- :code: ` zip_iterator ` update the source iterators of a :code: ` zip_iterator ` instance as though the
347
+ `` zip_iterator ` ` is an iterator-like type defined over one or more iterators. When dereferenced,
348
+ the value returned from `` zip_iterator ` ` is a tuple of the values returned by dereferencing the
349
+ source iterators over which the `` zip_iterator `` is defined. The arithmetic operators of
350
+ `` zip_iterator `` update the source iterators of a `` zip_iterator ` ` instance as though the
351
351
operation were applied to each of these iterators.
352
352
353
353
.. code :: cpp
@@ -356,14 +356,14 @@ operation were applied to each of these iterators.
356
356
zip_iterator<Iterators...>
357
357
make_zip_iterator(Iterators...);
358
358
359
- :code: ` make_zip_iterator ` constructs and returns an instance of :code: ` zip_iterator `
359
+ `` make_zip_iterator `` constructs and returns an instance of `` zip_iterator ` `
360
360
using the set of source iterators provided.
361
361
362
362
Parallel Algorithms
363
363
+++++++++++++++++++
364
364
365
- The parallel algorithms are defined in the :code: ` <oneapi/dpl/algorithm> ` header,
366
- in :code: ` namespace oneapi::dpl `.
365
+ The parallel algorithms are defined in the `` <oneapi/dpl/algorithm> ` ` header,
366
+ in `` namespace oneapi::dpl ` `.
367
367
368
368
.. code :: cpp
369
369
@@ -383,17 +383,17 @@ in :code:`namespace oneapi::dpl`.
383
383
BinaryOp binary_op =
384
384
std::plus<typename std::iterator_traits<InputValueIt>::value_type>());
385
385
386
- :code: ` oneapi::dpl::exclusive_scan_by_segment ` performs partial prefix scans by applying the
387
- :code: ` binary_op ` operation to a sequence of values. Each partial scan applies to a contiguous
386
+ `` oneapi::dpl::exclusive_scan_by_segment ` ` performs partial prefix scans by applying the
387
+ `` binary_op ` ` operation to a sequence of values. Each partial scan applies to a contiguous
388
388
subsequence determined by the keys associated with the values being equal according to the
389
- :code: ` binary_pred ` predicate, and the first element of each scan is the initial value provided.
389
+ `` binary_pred ` ` predicate, and the first element of each scan is the initial value provided.
390
390
The return value is an iterator targeting the end of the result sequence.
391
391
392
- The initial value used if one is not provided is an instance of the :code: ` value_type ` of the
393
- :code: ` InputValueIt ` iterator type initialized to 0. If no binary predicate is provided for the
394
- comparison of keys an instance of :code: ` std::equal_to ` with the :code: ` value_type ` of the
395
- :code: ` InputKeyIt ` iterator type is used. Finally, an instance of :code: ` std::plus ` with the
396
- :code: ` value_type ` of the :code: ` InputValueIt ` iterator type is used if no binary operator is
392
+ The initial value used if one is not provided is an instance of the `` value_type ` ` of the
393
+ `` InputValueIt ` ` iterator type initialized to 0. If no binary predicate is provided for the
394
+ comparison of keys an instance of `` std::equal_to `` with the `` value_type ` ` of the
395
+ `` InputKeyIt `` iterator type is used. Finally, an instance of `` std::plus ` ` with the
396
+ `` value_type `` of the `` InputValueIt ` ` iterator type is used if no binary operator is
397
397
provided to combine the elements of the value subsequences.
398
398
399
399
.. code :: cpp
@@ -412,15 +412,15 @@ provided to combine the elements of the value subsequences.
412
412
BinaryOp binary_op =
413
413
std::plus<typename std::iterator_traits<InputValueIt>::value_type>());
414
414
415
- :code: ` oneapi::dpl::inclusive_scan_by_segment ` performs partial prefix scans by applying the
416
- :code: ` binary_op ` operation to a sequence of values. Each partial scan applies to a contiguous
415
+ `` oneapi::dpl::inclusive_scan_by_segment ` ` performs partial prefix scans by applying the
416
+ `` binary_op ` ` operation to a sequence of values. Each partial scan applies to a contiguous
417
417
subsequence determined by the keys associated with the values being equal according to the
418
- :code: ` binary_pred ` predicate. The return value is an iterator targeting the end of the result
418
+ `` binary_pred ` ` predicate. The return value is an iterator targeting the end of the result
419
419
sequence.
420
420
421
- If no binary predicate is provided for the comparison of keys an instance of :code: ` std::equal_to `
422
- with the :code: ` value_type ` of the :code: ` InputKeyIt ` iterator type is used. An instance of
423
- :code: ` std::plus ` with the :code: ` value_type ` of the :code: ` InputValueIt ` iterator type is used if
421
+ If no binary predicate is provided for the comparison of keys an instance of `` std::equal_to ` `
422
+ with the `` value_type `` of the `` InputKeyIt `` iterator type is used. An instance of
423
+ `` std::plus `` with the `` value_type `` of the `` InputValueIt ` ` iterator type is used if
424
424
no binary operator is provided to combine the elements of the value subsequences.
425
425
426
426
.. code :: cpp
@@ -440,16 +440,16 @@ no binary operator is provided to combine the elements of the value subsequences
440
440
BinaryOp binary_op =
441
441
std::plus<typename std::iterator_traits<InputValueIt>::value_type>());
442
442
443
- :code: ` oneapi::dpl::reduce_by_segment ` performs partial reductions on a sequence of values. Each
444
- reduction is computed with the :code: ` binary_op ` operation for a contiguous subsequence of values
445
- determined by the associated keys being equal according to the :code: ` binary_pred ` predicate.
446
- For each subsequence the first of the equal keys is stored into :code: ` keys_result ` and the computed
447
- reduction is stored into :code: ` values_result `. The return value is a pair of
443
+ `` oneapi::dpl::reduce_by_segment ` ` performs partial reductions on a sequence of values. Each
444
+ reduction is computed with the `` binary_op ` ` operation for a contiguous subsequence of values
445
+ determined by the associated keys being equal according to the `` binary_pred ` ` predicate.
446
+ For each subsequence the first of the equal keys is stored into `` keys_result ` ` and the computed
447
+ reduction is stored into `` values_result ` `. The return value is a pair of
448
448
iterators holding the end of the resulting sequences.
449
449
450
- If no binary predicate is provided for the comparison of keys an instance of :code: ` std::equal_to `
451
- with the :code: ` value_type ` of the :code: ` InputKeyIt ` iterator type is used. An instance of
452
- :code: ` std::plus ` with the :code: ` value_type ` of the :code: ` InputValueIt ` iterator type is used to
450
+ If no binary predicate is provided for the comparison of keys an instance of `` std::equal_to ` `
451
+ with the `` value_type `` of the `` InputKeyIt ` ` iterator type is used. An instance of
452
+ `` std::plus `` with the `` value_type `` of the `` InputValueIt ` ` iterator type is used to
453
453
combine the values in each subsequence identified if a binary operator is not provided.
454
454
455
455
.. code :: cpp
@@ -463,16 +463,17 @@ combine the values in each subsequence identified if a binary operator is not pr
463
463
Comparator comp =
464
464
std::less<typename std::iterator_traits<InputIt1>::value_type>());
465
465
466
- :code: ` oneapi::dpl::binary_search ` performs a binary search over the data in :code: ` [start, end) `
467
- for each value in :code: ` [value_first, value_last) `. If the value exists in the data searched then
468
- the corresponding element in :code: ` [result, result + distance(value_first, value_last)) ` is set to
466
+ `` oneapi::dpl::binary_search `` performs a binary search over the data in `` [start, end) ` `
467
+ for each value in `` [value_first, value_last) ``. If the value exists in the data searched then
468
+ the corresponding element in `` [result, result + distance(value_first, value_last)) ` ` is set to
469
469
true, otherwise it is set to false.
470
470
471
- If no comparator is provided, :code: ` operator< ` is used to determine when the search value is less
471
+ If no comparator is provided, `` operator< ` ` is used to determine when the search value is less
472
472
than an element in the range being searched.
473
473
474
- The elements e of [start, end) must be partitioned with respect to the comparator used. For all
475
- elements e in [start, end) and a given search value v in [value_first, value_last) comp(e, v) implies !comp(v, e).
474
+ The elements of ``[start, end) `` must be partitioned with respect to the comparator used. For all
475
+ elements ``e `` in ``[start, end) `` and a given search value ``v `` in ``[value_first, value_last) ``,
476
+ ``comp(e, v) `` implies ``!comp(v, e) ``.
476
477
477
478
.. code :: cpp
478
479
@@ -485,16 +486,16 @@ elements e in [start, end) and a given search value v in [value_first, value_las
485
486
Comparator comp =
486
487
std::less<typename std::iterator_traits<InputIt1>::value_type>());
487
488
488
- :code: ` oneapi::dpl::lower_bound ` performs a binary search over the data in :code: ` [start, end) ` for
489
- each value in :code: ` [value_first, value_last) ` to find the lowest index at which the search value
490
- could be inserted in :code: ` [start, end) ` without violating the ordering defined by the comparator
489
+ `` oneapi::dpl::lower_bound `` performs a binary search over the data in `` [start, end) ` ` for
490
+ each value in `` [value_first, value_last) ` ` to find the lowest index at which the search value
491
+ could be inserted in `` [start, end) ` ` without violating the ordering defined by the comparator
491
492
provided. That lowest index is then assigned to the corresponding element in
492
- :code: ` [result, result + distance(value_first, value_last)) `.
493
+ `` [result, result + distance(value_first, value_last)) ` `.
493
494
494
- If no comparator is provided, :code: ` operator< ` is used to determine when the search value is less
495
+ If no comparator is provided, `` operator< ` ` is used to determine when the search value is less
495
496
than an element in the range being searched.
496
497
497
- The elements e of [start, end) must be partitioned with respect to the comparator used.
498
+ The elements of `` [start, end) `` must be partitioned with respect to the comparator used.
498
499
499
500
.. code :: cpp
500
501
@@ -507,16 +508,16 @@ The elements e of [start, end) must be partitioned with respect to the comparato
507
508
Comparator comp =
508
509
std::less<typename std::iterator_traits<InputIt1>::value_type>());
509
510
510
- :code: ` oneapi::dpl::upper_bound ` performs a binary search over the data in :code: ` [start, end) `
511
- for each value in :code: ` [value_first, value_last) ` to find the highest index at which the search
512
- value could be inserted in :code: ` [start, end) ` without violating the ordering defined by the
511
+ `` oneapi::dpl::upper_bound `` performs a binary search over the data in `` [start, end) ` `
512
+ for each value in `` [value_first, value_last) ` ` to find the highest index at which the search
513
+ value could be inserted in `` [start, end) ` ` without violating the ordering defined by the
513
514
comparator provided. That highest index is then assigned to the corresponding element in
514
- :code: ` [result, result + distance(value_first, value_last)) `.
515
+ `` [result, result + distance(value_first, value_last)) ` `.
515
516
516
- If no comparator is provided, :code: ` operator< ` is used to determine when the search value is less
517
+ If no comparator is provided, `` operator< ` ` is used to determine when the search value is less
517
518
than an element in the range being searched.
518
519
519
- The elements e of [start, end) must be partitioned with respect to the comparator used.
520
+ The elements of `` [start, end) `` must be partitioned with respect to the comparator used.
520
521
521
522
.. _`C++ Standard` : https://isocpp.org/std/the-standard
522
523
.. _`SYCL` : https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html
0 commit comments