Skip to content

[oneDPL][ranges] + zip_view implementation for C++20 #1877

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

Open
wants to merge 129 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
0036e38
[oneDPL][ranges][zip_view] + initial implementation of standard compl…
MikeDvorskiy Sep 17, 2024
46aa4b3
[oneDPL][ranges][zip_view] + missing arithmetic operations for zip_vi…
MikeDvorskiy Sep 18, 2024
c343888
[oneDPL][ranges][zip_view] + return type fix for operator*()
MikeDvorskiy Sep 20, 2024
f9e6f21
[oneDPL][ranges][tuple] + const assignment operator overload
MikeDvorskiy Sep 24, 2024
5033a32
[oneDPL][ranges][zip_view] + test
MikeDvorskiy Sep 24, 2024
ef4088a
[oneDPL][ranges][zip_view] + apply_to_tuple instead of std::apply; st…
MikeDvorskiy Sep 24, 2024
2aa4985
[oneDPL][ranges][zip_view] + changes in the test
MikeDvorskiy Sep 25, 2024
9162f21
[oneDPL][ranges][zip_view] -> oneapi::dpl::ranges
MikeDvorskiy Sep 25, 2024
d1beada
[oneDPL][ranges][zip_view][test] -> oneapi::dpl::ranges
MikeDvorskiy Sep 25, 2024
8739ce3
[oneDPL][ranges][zip_view] + file header and guards
MikeDvorskiy Sep 25, 2024
eb9cd9a
[oneDPL][ranges][zip_view] + apply_to_tuple instead of std::apply; st…
MikeDvorskiy Sep 25, 2024
955f665
[oneDPL][ranges][zip_view] + begin_imp, end_impl to reduce code dupli…
MikeDvorskiy Sep 26, 2024
9f11548
Revert "[oneDPL][ranges][zip_view] + begin_imp, end_impl to reduce co…
MikeDvorskiy Sep 26, 2024
d746349
[oneDPL][ranges][zip_view][test] + minor changes
MikeDvorskiy Sep 27, 2024
5df0c7f
[oneDPL][ranges][zip_view] + minor changes
MikeDvorskiy Oct 7, 2024
14b85a6
[oneDPL][ranges][zip_view] + #include "tuple_impl.h"
MikeDvorskiy Oct 9, 2024
844a8f5
[oneDPL][ranges][zip_view][test] + test_zip_view_base_op()
MikeDvorskiy Oct 22, 2024
005bd63
[oneDPL][ranges][zip_view] + implementation fix for 'operator-' betwe…
MikeDvorskiy Oct 18, 2024
8b9e0c6
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
730f73a
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
f16862a
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
5a9612c
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
5b4f4f2
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
fc764ec
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
53159c2
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
4e481ec
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
3588750
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Oct 21, 2024
f76058b
[oneDPL][ranges][zip_view] + std::get usage
MikeDvorskiy Oct 21, 2024
c8764cb
[oneDPL][ranges][zip_view] + 'std::forward<decltype(__args)>(__args)'…
MikeDvorskiy Oct 21, 2024
a06381e
[oneDPL][ranges][zip_view] + 'minor change' for const/non const type …
MikeDvorskiy Oct 21, 2024
eb730d9
[oneDPL][ranges][zip_view] + fix operator<=> implementation
MikeDvorskiy Oct 22, 2024
1d236c5
[oneDPL][ranges][zip_view][test] removed cbegin(), cend() test cases …
MikeDvorskiy Oct 25, 2024
13c8a47
[oneDPL][ranges][zip_view][test] + front(), back() methods check
MikeDvorskiy Oct 25, 2024
9192e16
[oneDPL][ranges][zip_view][test] + empty constructor call check
MikeDvorskiy Oct 29, 2024
672c338
[oneDPL][ranges][zip_view][test] + ;
MikeDvorskiy Oct 30, 2024
3481755
[oneDPL][ranges][zip_view][test] const for compare_with_sentinels
MikeDvorskiy Nov 4, 2024
369e834
[oneDPL][ranges][zip_view][test] a fix for zip_view::iterator::operator-
MikeDvorskiy Nov 6, 2024
68235f3
[oneDPL][rfc][zip_view] + std::ranges::range_reference_t usage; it f…
MikeDvorskiy Nov 8, 2024
608d41d
[oneDPL][ranges][zip_view][test] + minor changes
MikeDvorskiy Nov 8, 2024
ea064b3
[oneDPL][zip_view] + minor improvements
MikeDvorskiy Nov 15, 2024
7444e8a
[oneDPL][ranges][zip_view][test] + EXPECT_TRUE usage
MikeDvorskiy Nov 19, 2024
3459ef3
[oneDPL][ranges][zip_view] + operator oneapi::dpl::zip_iterator<Itera…
MikeDvorskiy Dec 2, 2024
a6cbee2
[oneDPL][ranges][zip_view][test] + check conversion to oneapi::dpl::z…
MikeDvorskiy Dec 2, 2024
d90347e
[oneDPL][ranges][zip_view][test] + EXPECT_TRUE usage
MikeDvorskiy Dec 5, 2024
aceb91e
[oneDPL][ranges][zip_view] + clang format
MikeDvorskiy Jan 16, 2025
569953a
[oneDPL][ranges][zip_view][test] + result checks
MikeDvorskiy Jan 16, 2025
62701a8
[oneDPL][ranges][zip_view] + LLVM tests for ranges::zip_view (from C+…
MikeDvorskiy Feb 5, 2025
0fd0f61
[oneDPL][ranges][zip_view] + __simple_view_concep. a fix for operator==
MikeDvorskiy Feb 7, 2025
a57cc16
[oneDPL][ranges][zip_view][test] LLVM test begin.pass adaptation for …
MikeDvorskiy Feb 7, 2025
9226607
[oneDPL][ranges][zip_view] + fix for end() and compare_equal
MikeDvorskiy Feb 7, 2025
092efb9
[oneDPL][ranges][zip_view][test] LLVM test end.pass adaptation for on…
MikeDvorskiy Feb 7, 2025
06ebc5d
[oneDPL][ranges][zip_view] + fix an error in zip_fn
MikeDvorskiy Feb 7, 2025
015de4e
[oneDPL][ranges][zip_view][test] LLVM test cpo.pass adaptation for on…
MikeDvorskiy Feb 7, 2025
6bbc6f8
[oneDPL][ranges][zip_view] + implementation fixes
MikeDvorskiy Feb 10, 2025
094803d
[oneDPL][ranges][zip_view][test] LLVM test borrowing.compile.pass ada…
MikeDvorskiy Feb 10, 2025
a6e0653
[oneDPL][ranges][zip_view] + explicit for constructor
MikeDvorskiy Feb 10, 2025
6282d92
[oneDPL][ranges][zip_view][test] LLVM test сtad.compile.pass adaptati…
MikeDvorskiy Feb 10, 2025
0dfd5e1
[oneDPL][ranges][zip_view][test] LLVM test сtor.default.pass adaptati…
MikeDvorskiy Feb 10, 2025
78ca9e2
[oneDPL][ranges][zip_view][test] LLVM test general.pass and ctor.view…
MikeDvorskiy Feb 10, 2025
f454471
[oneDPL][ranges][zip_view] + correct implementation of method 'size()…
MikeDvorskiy Feb 10, 2025
42f7035
[oneDPL][ranges][zip_view][test] another couple of LLVM tests adapta…
MikeDvorskiy Feb 10, 2025
10faeb4
[oneDPL][ranges][zip_view] + arithmetic operation fixes
MikeDvorskiy Feb 12, 2025
24c6c79
[oneDPL][ranges][zip_view][test] LLVM test arithmetict.pass adaptatio…
MikeDvorskiy Feb 12, 2025
47bb794
[oneDPL][ranges][zip_view] + fixes in private zip_view::iterator cons…
MikeDvorskiy Feb 12, 2025
60a1fb4
[oneDPL][ranges][zip_view][test] compare.pass test adaptation for oneDPL
MikeDvorskiy Feb 12, 2025
ee1235f
[oneDPL][ranges][zip_view] + fixes in apply_to_tuple using
MikeDvorskiy Feb 12, 2025
ee1ce4b
[oneDPL][ranges][zip_view][test] another LLVM test portion were adopt…
MikeDvorskiy Feb 12, 2025
4f00f3b
[oneDPL][ranges][zip_view] + iter_move friend method
MikeDvorskiy Feb 13, 2025
7afe930
[oneDPL][ranges][zip_view][test] another couple of LLVM tests adapta…
MikeDvorskiy Feb 13, 2025
73d8b0d
[oneDPL][ranges][zip_view] + iter_swap friend method
MikeDvorskiy Feb 13, 2025
8e9aac4
[oneDPL][ranges][zip_view][test] LLVM test iter_swap.pass adaptation …
MikeDvorskiy Feb 13, 2025
36dcea8
[oneDPL][ranges][zip_view] + fix: public inheritance for class iterat…
MikeDvorskiy Feb 13, 2025
bd0bb0d
[oneDPL][ranges][zip_view][test] another LLVM test adaptation for on…
MikeDvorskiy Feb 13, 2025
182bb1c
[oneDPL][ranges][zip_view][test] another couple of LLVM tests adapta…
MikeDvorskiy Feb 13, 2025
f0a9179
[oneDPL][ranges][zip_view][test] + test cases disabling #if __GNUC__ …
MikeDvorskiy Feb 13, 2025
cd3703f
[oneDPL][ranges][tuple] + a fix for default. According to std::tuple:…
MikeDvorskiy Feb 17, 2025
fc99b42
[oneDPL][ranges][zip_view] + a fix: __maybe_const usage.
MikeDvorskiy Feb 17, 2025
241e531
[oneDPL][ranges][zip_view][test] another LLVM tests adaptation for o…
MikeDvorskiy Feb 17, 2025
aaa003c
[oneDPL][ranges][zip_view][test] minor changes for begin.pass test
MikeDvorskiy Feb 17, 2025
37220a5
[oneDPL][ranges][zip_view][test] the tests renamed: + prefix "zip_view."
MikeDvorskiy Feb 17, 2025
d4aa5a5
[oneDPL] a fixe for __pattern_walk2 implementation in case of forward…
MikeDvorskiy Feb 17, 2025
ca5a53a
[oneDPL][ranges][zip_view] removed spaces
MikeDvorskiy Feb 17, 2025
721efeb
Revert "[oneDPL] a fixe for __pattern_walk2 implementation in case of…
MikeDvorskiy Feb 18, 2025
c9ca7f2
[oneDPL][ranges][zip_view][test] additional LLVM tests adaptation for…
MikeDvorskiy Feb 19, 2025
0fb1085
[oneDPL][ranges][tuple] + a fix for Value-initializes all elements of…
MikeDvorskiy Feb 18, 2025
45576ee
[oneDPL][ranges][zip_view][test] + #include "support/test_config.h"
MikeDvorskiy Feb 18, 2025
97f339a
[oneDPL][ranges][tuple] + a fix for the internal tuple default constr…
MikeDvorskiy Feb 19, 2025
8e33f7e
[oneDPL][ranges][zip_view] + namespace views = ranges::views;
MikeDvorskiy Feb 19, 2025
9246e5d
[oneDPL][ranges][zip_view][test] removed unused code
MikeDvorskiy Feb 24, 2025
19aa4e9
[oneDPL][ranges][zip_view] + fix: std::ranges::enable_borrowed_range …
MikeDvorskiy Feb 24, 2025
8e8c833
[oneDPL][ranges][zip_view][test] + include
MikeDvorskiy Feb 24, 2025
31dce7f
[oneDPL][ranges][zip_view] + fix: using ranges::views::zip; in dpl::v…
MikeDvorskiy Feb 24, 2025
a28198d
[oneDPL][ranges][zip_view] + fixes
MikeDvorskiy Feb 24, 2025
5b3dbb5
[oneDPL][ranges][zip_view] + fixes
MikeDvorskiy Feb 24, 2025
1edac7f
[oneDPL][ranges][zip_view] + a fix for iterator private constructor
MikeDvorskiy Feb 25, 2025
d4807c5
[oneDPL][ranges][zip_view][test] + name space fix
MikeDvorskiy Feb 25, 2025
1b0bac6
[oneDPL][tuple] + a comment default constructor
MikeDvorskiy Feb 25, 2025
009ee61
[oneDPL][ranges][zip_view][test] removed // UNSUPPORTED: c++03, c++11…
MikeDvorskiy Feb 25, 2025
7315296
Apply suggestions from code review
MikeDvorskiy Feb 25, 2025
88c0fdb
[oneDPL][ranges][zip_view][test] header changed
MikeDvorskiy Feb 25, 2025
cfab47d
[oneDPL][ranges][zip_view] removed the commented code
MikeDvorskiy Feb 25, 2025
93cf1c5
Apply suggestions from code review
MikeDvorskiy Feb 26, 2025
3450c47
Apply suggestions from code review
MikeDvorskiy Feb 26, 2025
9c71c9f
[oneDPL][ranges][zip_view] + difference_type alias usage
MikeDvorskiy Feb 26, 2025
40900e8
Revert "[oneDPL][ranges][zip_view] + difference_type alias usage"
MikeDvorskiy Feb 26, 2025
f651ae9
[oneDPL][ranges][zip_view] + difference_type alias usage for iterator
MikeDvorskiy Feb 26, 2025
32752f1
[oneDPL][ranges][zip_view] + difference_type alias usage for sentinel
MikeDvorskiy Feb 26, 2025
72756f4
[oneDPL][ranges][zip_view] operator- code re-factored.
MikeDvorskiy Feb 28, 2025
924b315
[oneDPL][ranges][zip_view] uglification, part1
MikeDvorskiy Feb 28, 2025
db15c3d
[oneDPL][ranges][zip_view] __apply_to_tuple stuff refactoring
MikeDvorskiy Feb 28, 2025
65ad481
[oneDPL][ranges][zip_view] uglification, part2
MikeDvorskiy Feb 28, 2025
6ed25c4
[oneDPL][ranges][zip_view] moved the internal utility to namespace __…
MikeDvorskiy Feb 28, 2025
997d3ef
[oneDPL][ranges][zip_view] + clang format
MikeDvorskiy Feb 28, 2025
646f055
Revert "[oneDPL][ranges][zip_view] + clang format"
MikeDvorskiy Feb 28, 2025
7e8704b
[oneDPL][ranges][zip_view][tests] + removed unused code.
MikeDvorskiy Feb 28, 2025
c97c469
Update c++ standard in clang-format
dmitriy-sobolev Mar 3, 2025
6994c59
[oneDPL][ranges][zip_view][tests] + test cases with zip_view (and dpc…
MikeDvorskiy Mar 3, 2025
902c715
[oneDPL][ranges][zip_view] iterator_type -> iterators_type
MikeDvorskiy Mar 3, 2025
4846a37
[oneDPL][tuple] + clang format
MikeDvorskiy Mar 3, 2025
035db1b
[oneDPL][ranges][zip_view] + clang format
MikeDvorskiy Mar 3, 2025
4f204f2
[oneDPL][ranges][zip_view][test] + a test case for a device policy
MikeDvorskiy Mar 11, 2025
312835e
[oneDPL][ranges][zip_view][test] + sharing alias typel_type for sever…
MikeDvorskiy Mar 10, 2025
a9784eb
Revert "[oneDPL][ranges][zip_view][test] + sharing alias typel_type f…
MikeDvorskiy Mar 10, 2025
4b54d3d
[oneDPL][ranges][zip_view] + fix "return" for __apply_to_tuples
MikeDvorskiy Mar 10, 2025
b5c7565
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Mar 10, 2025
6898ae2
Update include/oneapi/dpl/pstl/zip_view_impl.h
MikeDvorskiy Mar 10, 2025
2bbd13b
[oneDPL][ranges][zip_view] + alias __iterators_type unification
MikeDvorskiy Mar 10, 2025
455a394
Revert "[oneDPL][ranges][zip_view] + alias __iterators_type unification"
MikeDvorskiy Mar 10, 2025
923feff
[oneDPL][ranges][zip_view] + check trivially copyability
MikeDvorskiy Apr 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BasedOnStyle: LLVM

Standard: c++17
Standard: c++20

IndentWidth: 4
ColumnLimit: 120
Expand Down
3 changes: 3 additions & 0 deletions include/oneapi/dpl/pstl/ranges_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#include <ranges>
#endif

//oneapi::dpl::ranges::zip_view support for C++20
#include "zip_view_impl.h"

#include "utils_ranges.h"
#if _ONEDPL_BACKEND_SYCL
# include "hetero/dpcpp/utils_ranges_sycl.h"
Expand Down
16 changes: 15 additions & 1 deletion include/oneapi/dpl/pstl/tuple_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,12 @@ struct tuple<T1, T...>
return get_impl<I>()(::std::move(*this));
}

tuple() = default;
template <typename _Tp = T1,
std::enable_if_t<
std::conjunction_v<std::is_default_constructible<_Tp>, std::is_default_constructible<T>...>, int> = 0>
tuple() : holder{}, next{}
{
} //The std::tuple makes value-initialization all elements, so we also follow this.
tuple(const tuple& other) = default;
tuple(tuple&& other) = default;
template <typename _U1, typename... _U, typename = ::std::enable_if_t<(sizeof...(_U) == sizeof...(T))>>
Expand Down Expand Up @@ -501,6 +506,15 @@ struct tuple<T1, T...>
return *this;
}

template <typename U1, typename... U>
tuple&
operator=(const tuple<U1, U...>& other) const
{
holder.value = other.holder.value;
next = other.next;
return *this;
}

// if T1 is deduced with reference, compiler generates deleted operator= and,
// since "template operator=" is not considered as operator= overload
// the deleted operator= has a preference during lookup
Expand Down
Loading
Loading