Skip to content

Commit 6675ed2

Browse files
authored
[oneDPL] Expand and clarify differences with serial range algorithms (#610)
1 parent 71f6bf6 commit 6675ed2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

source/elements/oneDPL/source/parallel_api/parallel_range_api.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ The following differences to the standard C++ range algorithms apply:
2323
- The execution policy parameter is added.
2424
- Output data sequences are defined as ranges, not iterators.
2525
- Both input and output ranges must support random access.
26-
- For a given algorithm, at least one of the input ranges as well as the output range must be bounded.
26+
- As a rule, both input and output ranges must be sized.
27+
28+
- Exceptions are binary ``transform``, ``equal``, and ``mismatch``, where at least one of the input ranges
29+
must be sized, and if a range is not sized it is supposed to be infinite.
30+
[*Note*: An example of an infinite range is ``std::views::repeat`` with no bound. -- *end note*]
31+
32+
- For algorithms with bounded output ranges, processing may not need to go over all the input data.
33+
In that case, the returned value usually contains iterators pointing to the positions past the last elements
34+
processed according to the algorithm semantics.
2735
- ``for_each`` does not return its function object.
2836

2937
Except for these differences, the signatures of parallel range algorithms correspond to the working draft

0 commit comments

Comments
 (0)