Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC for zip_view implementation, for oneDPL C++20 #1931

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MikeDvorskiy
Copy link
Contributor

@MikeDvorskiy MikeDvorskiy commented Nov 4, 2024

The proposal to implement zip_view in oneDPL. A part of the general RFC discussion #1944 about implementing useful C++23 views.

@MikeDvorskiy MikeDvorskiy marked this pull request as draft November 4, 2024 16:54
@MikeDvorskiy MikeDvorskiy marked this pull request as ready for review November 19, 2024 17:06
### Key Requirements
`oneapi::dpl::ranges::zip_view` should have:
- API compliance with `std::ranges::zip_view`
- `oneapi::dpl::__internal::tuple` underhood, due to `std::tuple` has issues with swapability and device copyability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be just "oneDPL zip_view should be device copyable"?

Regarding swap: does the standard zip_view work with std::sort? If yes, how does it deal with swapping temporaries?

which the same API and functionality as `std::ranges::zip_view`.


### Key Requirements
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is more requirements / open questions to think about:

  • The necessity to support C++20.
  • What about using it with the non-range algorithms via zip_view::iterator?
  • How would it correlate with zip_iterator?
  • Should/will it work with any "underlying" views/ranges, or there might be restrictions?
  • Anything special that distributed ranges would need?

Comment on lines +21 to +25
### Performance
Combining `std::ranges::zip_view` with data pipelines and kernel fusion enables developers to write expressive,
efficient code for processing multiple related datasets. This approach not only simplifies the logic but also
optimizes performance, making it an essential technique in modern C++ development. Whether you're working with
simple transformations or complex data processing workflows, zip_view can be a valuable utility.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part seems rather motivational.
Are there any performance-related design considerations and/or requirements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants