From 09bd19995c0360d38b4ca850ef1162812b16fa14 Mon Sep 17 00:00:00 2001 From: MikeDvorskiy Date: Mon, 4 Nov 2024 17:42:03 +0100 Subject: [PATCH] [oneDPL][rfc][zip_view] + draft --- rfcs/proposed/zip_view/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 rfcs/proposed/zip_view/README.md diff --git a/rfcs/proposed/zip_view/README.md b/rfcs/proposed/zip_view/README.md new file mode 100644 index 0000000000..2a1518746c --- /dev/null +++ b/rfcs/proposed/zip_view/README.md @@ -0,0 +1,25 @@ +# zip_view Support for the oneDPL Range APIs with C++20 + +## Introduction +`std::ranges::zip_view` is powerful utility enables developers to combine two or more ranges into a single view, +where each element is represented as a tuple containing corresponding elements from each input range. + +## Motivations +`std::ranges::zip_view` is a convenient way to combine multiple ranges into a single view, where each element of +the resulting range is a tuple containing one element from each of the input ranges. This can be particularly +useful for iterating over multiple collections in parallel. `std::ranges::zip_view` is introduced starting with C++23, +but there are many users who work with C++20 standard yet. So, oneDPL introduces `oneapi::dpl::ranges::zip_view`, +which the same API and functionality as `std::ranges::zip_view`. + + +### 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. + + +### 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.