-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[oneDPL][rfc][ranges] proposal for implementation of the second part …
…of range based API for oneDPL
- Loading branch information
1 parent
4766dae
commit 816ef41
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Support the second portion of the oneDPL Range APIs | ||
|
||
## Introduction | ||
Based on statistics (observing C++ code within github.com) for the usage of popular algorithms, the following | ||
range-based APIs are supposed to be implemented in oneDPL. | ||
`fill`, `generate`, `move`, `replace`, `replace_if`, `remove`, `remove_if`, `mismatch`, `minmax_element`, `minmax`, | ||
`min`, `max`, `find_first_of`, `find_end`, `is_sorted_until` | ||
|
||
## Motivations | ||
The feature is proposed as the next step of range-based API support for oneDPL. | ||
|
||
### Key Requirements | ||
- The range-based signatures for the mentioned API should correspond to the proposal for C++ parallel range algorithms, P3179. | ||
(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3179r4.html) | ||
- The proposed implementation should support all oneDPL execution policies: `seq`, `unseq`, `par`, `par_unseq` and `a device policy`. | ||
|
||
### Implementation proposal | ||
- The implementation is supposed to rely on existing range-based or iterator-based algorithm patterns, which are already | ||
implemented in oneDPL. | ||
- Several algorithms described in P3179 have slightly different semantics. To implement these, some existing algorithm patterns | ||
might require modifications or new versions. | ||
|
||
### Test coverage | ||
|
||
- It should be called with both small and large data sizes and with all the policies mentioned above. | ||
- Output data, return type, and value should be checked/compared with the reference result | ||
computed by the corresponding serial std::ranges algorithm or by a custom implemented serial version | ||
in case of different semantics. |