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

Implementation of tag dispatching on current codebase #1239

Merged
merged 588 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
588 commits
Select commit Hold shift + click to select a range
5f34eda
async patterns tag impls and calls
Feb 19, 2024
6dcbdff
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_fpga.h - r…
Feb 19, 2024
a006b97
Apply GitHUB clang format
Feb 19, 2024
fd191e2
Fix self review comment: using oneapi::dpl::__internal::__device_back…
Feb 19, 2024
90827c2
Apply GitHUB clang format
Feb 19, 2024
508b95d
include/oneapi/dpl/pstl/hetero/algorithm_impl_hetero.h - fix self rev…
Feb 19, 2024
6d04ccb
Fix an error: remove extra __pattern_replace_if and it's usage
Feb 19, 2024
3aaa470
Merge branch 'main' into dev/skopienko/tag_dispatching
Feb 19, 2024
70cdfeb
include/oneapi/dpl/pstl/hetero/dpcpp/utils_ranges_sycl.h - implementa…
Feb 20, 2024
c299b06
__ranges::__pattern_transform_reduce + tag impls
Feb 20, 2024
b4f7eab
__ranges::__pattern_transform_scan_base + tag impls
Feb 20, 2024
646c63b
__ranges::__pattern_transform_scan + tag impls
Feb 20, 2024
a41760a
__ranges::__pattern_walk_n + tag impls
Feb 20, 2024
97ff7b2
__ranges::__pattern_swap + tag impls
Feb 20, 2024
bfec7cc
__ranges::__pattern_equal + tag impls
Feb 20, 2024
2313a2b
__ranges::__pattern_find_if + tag impls
Feb 20, 2024
fbfe04f
__ranges::__pattern_find_end + tag impls
Feb 20, 2024
1844c14
__ranges::__pattern_find_first_of + tag impls
Feb 20, 2024
aef8759
__ranges::__pattern_any_of + tag impls
Feb 20, 2024
b3fb59f
__ranges::__pattern_search + tag impls
Feb 20, 2024
b49ec8a
__ranges::__pattern_search_n + tag impls
Feb 20, 2024
1fb9702
__ranges::__pattern_adjacent_find + tag impls
Feb 20, 2024
2e72a4b
__ranges::__pattern_count + tag impls
Feb 20, 2024
812baf8
__ranges::__pattern_scan_copy + tag impls
Feb 20, 2024
d2bfb4c
__ranges::__pattern_copy_if + tag impls
Feb 20, 2024
02ea7a2
__ranges::__pattern_remove_if + tag impls
Feb 20, 2024
4a118ba
__ranges::__pattern_unique_copy + tag impls
Feb 20, 2024
2094d0b
__ranges::__pattern_unique + tag impls
Feb 20, 2024
c667ecd
__ranges::__pattern_merge + tag impls
Feb 20, 2024
6980f0e
__ranges::__pattern_sort + tag impls
Feb 20, 2024
b7a51ff
__ranges::__pattern_minmax_element + tag impls
Feb 20, 2024
f3c553c
__ranges::__pattern_min_element + tag impls
Feb 20, 2024
9de0038
__ranges::__pattern_reduce_by_segment + tag impls
Feb 20, 2024
1b889f6
__ranges::__pattern_any_of + tag calls
Feb 20, 2024
70efe25
__ranges::__pattern_walk_n + tag calls
Feb 20, 2024
0e3738e
__ranges::__pattern_find_if + tag calls
Feb 20, 2024
543cff4
__ranges::__pattern_find_end + tag calls
Feb 20, 2024
9f081e5
__ranges::__pattern_find_first_of + tag calls
Feb 20, 2024
ae9984e
__ranges::__pattern_adjacent_find + tag calls
Feb 20, 2024
2937bbb
__ranges::__pattern_count + tag calls
Feb 20, 2024
02a2616
__ranges::__pattern_search + tag calls
Feb 20, 2024
38f1047
__ranges::__pattern_search_n + tag calls
Feb 20, 2024
0c3343b
__ranges::__pattern_copy_if + tag calls
Feb 20, 2024
0499f0c
__ranges::__pattern_swap + tag calls
Feb 20, 2024
4135e7e
__ranges::__pattern_remove_if + tag calls
Feb 20, 2024
94f5e8f
__ranges::__pattern_unique + tag calls
Feb 20, 2024
8af241a
__ranges::__pattern_unique_copy + tag calls
Feb 20, 2024
77ea0e6
__ranges::__pattern_sort + tag calls
Feb 20, 2024
8b9e0f4
__ranges::__pattern_equal + tag calls
Feb 20, 2024
2e7d206
__ranges::__pattern_merge + tag calls
Feb 20, 2024
8cee65a
__ranges::__pattern_min_element + tag calls
Feb 20, 2024
4d7e062
__ranges::__pattern_minmax_element + tag calls
Feb 20, 2024
2a55f39
__ranges::__pattern_reduce_by_segment + tag calls
Feb 20, 2024
a1e1a95
__ranges::__pattern_transform_scan_base + tag calls
Feb 20, 2024
e22bbcc
__ranges::__pattern_transform_reduce + tag calls
Feb 20, 2024
3c01d9c
__ranges::__pattern_transform_scan + tag calls
Feb 20, 2024
d7290b1
__ranges::__pattern_scan_copy + tag calls
Feb 20, 2024
cf9dbd0
__par_backend_hetero::__parallel_transform_reduce + tag calls
Feb 20, 2024
bb4bbe4
__par_backend_hetero::__parallel_transform_scan_base + tag calls
Feb 20, 2024
1e02cad
__par_backend_hetero::__parallel_for + tag calls
Feb 20, 2024
926084b
__par_backend_hetero::__parallel_find_or + tag calls
Feb 20, 2024
acf4090
_par_backend_hetero::__parallel_transform_reduce + tag calls
Feb 20, 2024
ecb002a
__par_backend_hetero::__parallel_merge + tag calls
Feb 20, 2024
6af11b7
__par_backend_hetero::__parallel_stable_sort + tag calls
Feb 20, 2024
c195fb8
include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h - fix s…
Feb 20, 2024
b920940
include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h - remov…
Feb 20, 2024
a95f9ee
__ranges::__pattern_search + tag impls
Feb 20, 2024
1952334
include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h - fix c…
Feb 20, 2024
402062c
include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h - fix c…
Feb 20, 2024
c11ed9a
include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h - add `…
Feb 20, 2024
e393899
__cancel_execution + tag impls
Feb 20, 2024
069653e
__cancel_execution + tag calls
Feb 20, 2024
c149334
include/oneapi/dpl/pstl/execution_impl.h - add using __backend_tag = …
Feb 20, 2024
b653193
using __buffer + tag impls
Feb 20, 2024
6426c62
using __buffer + tag calls
Feb 20, 2024
32b7a3a
Remove fpga_policy::__device_policy() and it's usage as not required …
Feb 20, 2024
a11b417
include/oneapi/dpl/pstl/execution_impl.h - fix self review comments
Feb 20, 2024
42e9702
Fix review comment: required to check __is_backend_tag_serial_v or __…
Feb 20, 2024
b70d807
include/oneapi/dpl/pstl/algorithm_impl.h - remove extra static_assert…
Feb 20, 2024
ef69023
test/general/test_tag_dispatching.pass.cpp - new test for tag_dispatc…
Feb 20, 2024
f92eb61
Revert "test/general/test_tag_dispatching.pass.cpp - new test for tag…
Feb 20, 2024
f802d3d
Merge branch 'main' into dev/skopienko/tag_dispatching
Feb 22, 2024
8986026
Implementation and usage of __select_backend_for_loop()
Feb 20, 2024
094e2b0
Remove __use_vectorization() and __use_parallelization()
Feb 20, 2024
e85cde0
Remove __is_vectorization_preferred()
Feb 20, 2024
e69d958
Remove __is_parallelization_preferred()
Feb 20, 2024
fc6b7a7
Remove struct __use_par_vec_helper
Feb 20, 2024
73724c3
Remove __allow_unsequenced(), __allow_vector() and __allow_parallel()…
Feb 20, 2024
eecf1e6
Remove template aliases __allow_vector, __allow_unsequenced and __all…
Feb 20, 2024
e55c415
Remove struct __policy_traits
Feb 20, 2024
efcd7e1
__pattern_for_loop_n + tag impls
Feb 22, 2024
0e66dd2
__pattern_for_loop + tag impls + add the new one impl of __pattern_fo…
Feb 22, 2024
f2698ca
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - check…
Feb 22, 2024
66b7109
include/oneapi/dpl/pstl/experimental/internal/for_loop.h - add static…
Feb 22, 2024
01957a9
include/oneapi/dpl/pstl/experimental/internal/for_loop.h - add static…
Feb 22, 2024
fdc0c1e
include/oneapi/dpl/pstl/experimental/internal/for_loop.h - add static…
Feb 22, 2024
baf4a5f
include/oneapi/dpl/pstl/experimental/internal/for_loop.h - add static…
Feb 22, 2024
dc0a722
test/parallel_api/experimental/for_loop.pass.cpp - fix error in test:…
Feb 22, 2024
a3f3a77
test/parallel_api/experimental/for_loop_reduction.pass.cpp - fix erro…
Feb 22, 2024
f77826e
test/parallel_api/experimental/for_loop_induction.pass.cpp - fix erro…
Feb 22, 2024
9c82869
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - remov…
Feb 22, 2024
5b3889c
Add comments into for_loop tests
Feb 22, 2024
8486872
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - refac…
Feb 22, 2024
67a678f
include/oneapi/dpl/pstl/iterator_defs.h - remove extra code: struct i…
Feb 22, 2024
1183633
include/oneapi/dpl/pstl/iterator_defs.h - remove extra code: struct i…
Feb 22, 2024
1c3a719
- added TODO for __ranges::__select_backend
Feb 22, 2024
cbf0a15
include/oneapi/dpl/pstl/execution_impl.h - add implementation of __is…
Feb 23, 2024
ab5a6ca
include/oneapi/dpl/internal/reduce_by_segment_impl.h - fix static_ass…
Feb 23, 2024
5e76949
Apply GitHUB clang format
Feb 23, 2024
4a9b98f
Merge branch 'main' into dev/skopienko/tag_dispatching
Feb 23, 2024
28283e5
include/oneapi/dpl/pstl/numeric_impl.h - fix static_assert check in _…
Feb 23, 2024
fcb57cd
include/oneapi/dpl/internal/binary_search_impl.h - fix static_assert …
Feb 23, 2024
6f406e6
include/oneapi/dpl/internal/binary_search_impl.h - fix static_assert …
Feb 23, 2024
df45ca9
include/oneapi/dpl/internal/binary_search_impl.h - fix static_assert …
Feb 23, 2024
17cceb0
include/oneapi/dpl/internal/exclusive_scan_by_segment_impl.h - fix st…
Feb 23, 2024
1d16850
Introduce __is_host_backend_tag_v
Feb 23, 2024
81488b6
Replace __is_backend_tag_v check to __is_host_backend_tag_v
Feb 23, 2024
16f727f
Remove __is_backend_tag, __is_backend_tag_v as not required anymore
Feb 23, 2024
16cf4b2
include/oneapi/dpl/pstl/hetero/algorithm_impl_hetero.h - remove unuse…
Feb 23, 2024
8533f7f
include/oneapi/dpl/pstl/numeric_impl.h - remove unused param `__tag`
Feb 23, 2024
f881b2e
include/oneapi/dpl/pstl/hetero/numeric_impl_hetero.h - remove unused …
Feb 23, 2024
f13e473
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_histogram.…
Feb 23, 2024
c547583
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h - fix __…
Feb 23, 2024
c11f1a0
Fix __histogram_general_private_global_atomics_submitter : __select_b…
Feb 23, 2024
650b239
include/oneapi/dpl/internal/scan_by_segment_impl.h - fix __sycl_scan_…
Feb 23, 2024
52732ec
Merge branch 'main' into dev/skopienko/tag_dispatching
Feb 26, 2024
e87aac5
include/oneapi/dpl/pstl/algorithm_fwd.h - fix error: remove class _Is…
Feb 26, 2024
ad2fa56
include/oneapi/dpl/pstl/algorithm_impl.h - additional static asserts
Feb 26, 2024
52a6c33
include/oneapi/dpl/pstl/execution_impl.h - remove extra comments
Feb 26, 2024
00ca18c
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h - remove…
Feb 27, 2024
3f09219
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h - remove…
Feb 27, 2024
5d918a2
Merge branch 'main' into dev/skopienko/tag_dispatching
Feb 27, 2024
4d84c6f
include/oneapi/dpl/pstl/iterator_defs.h - add '::' before std namespace
Feb 27, 2024
e31aa1b
include/oneapi/dpl/pstl/execution_impl.h - make __select_backend as n…
Feb 27, 2024
c5a882b
include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h - make __s…
Feb 27, 2024
8a914bb
include/oneapi/dpl/pstl/hetero/dpcpp/utils_ranges_sycl.h - make __sel…
Feb 27, 2024
68539ba
include/oneapi/dpl/internal/async_impl/glue_async_impl.h - rewrite ca…
Feb 27, 2024
f415b62
include/oneapi/dpl/internal/binary_search_impl.h - rewrite calls of _…
Feb 27, 2024
b5e5503
include/oneapi/dpl/internal/exclusive_scan_by_segment_impl.h - rewrit…
Feb 27, 2024
0b34894
include/oneapi/dpl/internal/inclusive_scan_by_segment_impl.h - rewrit…
Feb 27, 2024
237d2fa
include/oneapi/dpl/internal/reduce_by_segment_impl.h - rewrite calls …
Feb 27, 2024
3511276
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - rewri…
Feb 27, 2024
7c2cb0c
include/oneapi/dpl/pstl/histogram_impl.h - rewrite calls of __select_…
Feb 27, 2024
0919e37
include/oneapi/dpl/pstl/glue_numeric_ranges_impl.h - rewrite calls of…
Feb 27, 2024
44a29b8
include/oneapi/dpl/pstl/glue_numeric_impl.h - rewrite calls of __sele…
Feb 27, 2024
e01bd89
include/oneapi/dpl/pstl/glue_memory_impl.h - rewrite calls of __selec…
Feb 27, 2024
c0fd029
include/oneapi/dpl/pstl/glue_algorithm_ranges_impl.h - rewrite calls …
Feb 27, 2024
f0b5db6
include/oneapi/dpl/pstl/glue_algorithm_impl.h - rewrite calls of __se…
Feb 27, 2024
ec3d2a8
Merge branch 'dev/skopienko/tag_dispatching_make_select_backend_non_c…
Feb 28, 2024
3c8ab1c
include/oneapi/dpl/pstl/glue_memory_impl.h - fix compile error introd…
Feb 28, 2024
02b61f1
Apply GitHUB clang format
Feb 28, 2024
de39773
Merge branch 'main' into dev/skopienko/tag_dispatching
Feb 28, 2024
366163b
include/oneapi/dpl/internal/scan_by_segment_impl.h - fix review comme…
Feb 29, 2024
eb95d71
include/oneapi/dpl/pstl/algorithm_impl.h - fix review comment: ::std:…
Feb 29, 2024
730d1ba
include/oneapi/dpl/pstl/algorithm_impl.h - fix review comment: where …
Feb 29, 2024
dfc6f89
include/oneapi/dpl/pstl/glue_memory_impl.h - fix review comment: In c…
Feb 29, 2024
d5f94bd
include/oneapi/dpl/pstl/glue_memory_impl.h - fix review comment: rena…
Feb 29, 2024
19331f3
struct __brick_copy_n with tags - impls + calls
Feb 29, 2024
2f68546
struct __brick_copy, __brick_rotate_copy with tags - impls + calls
Feb 29, 2024
03d6b4b
struct __brick_move with tags - impls + calls
Feb 29, 2024
74a2357
struct __brick_move_destroy with tags - impls + calls
Feb 29, 2024
c52f153
struct __brick_fill with tags - impls + calls
Mar 1, 2024
ecca122
struct __brick_fill_n with tags - impls + calls
Mar 1, 2024
baf38db
include/oneapi/dpl/pstl/execution_defs.h - remove __enable_if_host_ex…
Feb 29, 2024
29d519f
struct __brick_copy_n - remove _ExecutionPolicy from template params
Mar 1, 2024
c94d8e2
struct __brick_copy - remove _ExecutionPolicy from template params
Mar 1, 2024
d0acc45
struct __brick_move - remove _ExecutionPolicy from template params
Mar 1, 2024
448f805
struct __brick_move_destroy - remove _ExecutionPolicy from template p…
Mar 1, 2024
4659c02
struct __brick_fill - remove _ExecutionPolicy from template params
Mar 1, 2024
d5f85bc
struct __brick_fill_n - remove _ExecutionPolicy from template params
Mar 1, 2024
0df1a0e
include/oneapi/dpl/pstl/algorithm_impl.h - remove __is_vector param f…
Mar 1, 2024
fdbb009
Revert "include/oneapi/dpl/pstl/algorithm_impl.h - remove __is_vector…
Mar 1, 2024
ef8e37d
Merge branch 'dev/skopienko/tag_dispatching_bricks' into dev/skopienk…
Mar 1, 2024
5bc3799
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 1, 2024
f1dab7f
Apply GitHUB clang format
Mar 1, 2024
4682a90
Fix review comment: It's very weird when the trait and _v shortcut mi…
Mar 1, 2024
fbd0f4f
Apply GitHUB clang format
Mar 1, 2024
90af819
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h - …
Mar 1, 2024
929f628
include/oneapi/dpl/pstl/omp/util.h - rename __buffer_impl to __buffer…
Mar 1, 2024
60b2a86
include/oneapi/dpl/pstl/parallel_backend_serial.h - rename __buffer_i…
Mar 1, 2024
ed68f27
include/oneapi/dpl/pstl/parallel_backend_tbb.h - rename __buffer_impl…
Mar 1, 2024
09611bb
__par_backend::__buffer usage
Mar 1, 2024
26768ca
Merge branch 'dev/skopienko/tag_dispatching_buffer_impl' into dev/sko…
Mar 1, 2024
70b983a
include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h - fix revi…
Mar 1, 2024
de81671
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 4, 2024
b69c310
Fix review comment: What's the point of reading the __backend_tag, wh…
Mar 5, 2024
23ef7d9
Fix review comment: if if we imagine that we need that check, I don't…
Mar 5, 2024
93036b2
include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h - fix revi…
Mar 5, 2024
bac418f
Fix review comment: Why is policy removed? The agreement was that we …
Mar 5, 2024
c044137
Fix review comment: Why is policy removed? The agreement was that we …
Mar 5, 2024
557f61c
Fix review comment: Why do we remove execution policy from bricks?
Mar 5, 2024
3f3c9e5
include/oneapi/dpl/pstl/hetero/algorithm_impl_hetero.h - fix compile …
Mar 5, 2024
003fd62
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 5, 2024
cf7e231
Apply GitHUB clang format
Mar 5, 2024
33b3c94
include/oneapi/dpl/pstl/algorithm_impl.h - remove using __backend_tag…
Mar 5, 2024
759566e
Revert "include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h - …
Mar 6, 2024
f489af1
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 6, 2024
6bfeb87
Fix review comment: Please leave the old semantics with a partial spe…
Mar 6, 2024
b2216a0
Fix review comment: Please leave the old semantics with a partial spe…
Mar 6, 2024
69ee18b
Revert "Fix review comment: Please leave the old semantics with a par…
Mar 6, 2024
8e4f5ea
Add _BackendTag as template param into __buffer implementations
Mar 6, 2024
7396323
Remove _BackendTag from params of __buffer contructor
Mar 6, 2024
9f9f017
Remove static_assert(::std::is_same_v<_ExecutionPolicy, ::std::decay_…
Mar 6, 2024
25abaa9
Rename dispatch tag check names
Mar 6, 2024
bd568cc
Fix compile error: implicit instantiation of undefined template 'onea…
Mar 6, 2024
e4ad81f
Apply GitHUB clang format
Mar 6, 2024
aeefbcc
Fix review comment: Why do we need __backend_tag type for the __seria…
Mar 6, 2024
80850dd
Fix review comment: Why do we need __backend_tag type for the __seria…
Mar 6, 2024
9b33ea7
Some additional comments for __select_backend
Mar 6, 2024
1df098a
Fix review comment: Please leave the old semantics with a partial spe…
Mar 6, 2024
ea89493
include/oneapi/dpl/pstl/glue_memory_impl.h - fix review comments in g…
Mar 7, 2024
27e5109
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 7, 2024
cab46e1
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - fix e…
Mar 7, 2024
d2b82e7
Revert "include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h…
Mar 7, 2024
19665c3
[oneDPL][for_loop][tag] + minimal support tag dispatching for experim…
MikeDvorskiy Mar 11, 2024
88c1667
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - repla…
Mar 12, 2024
343c857
[oneDPL][for_loop][tag] + std::declval using
MikeDvorskiy Mar 12, 2024
0667c9e
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - fix r…
Mar 13, 2024
1ed29eb
Fix review comment: Seems like _BackendTag should be the part of oper…
Mar 13, 2024
0900c07
include/oneapi/dpl/pstl/hetero/numeric_impl_hetero.h - fix review com…
Mar 13, 2024
ffe92fe
include/oneapi/dpl/pstl/execution_impl.h - fix review comment: The ch…
Mar 13, 2024
5b9818e
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h - fix re…
Mar 13, 2024
e9529f2
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h - fix re…
Mar 13, 2024
4a211dd
Fix review comment: why do you need having _BackendTag as template ar…
Mar 13, 2024
b9bd475
include/oneapi/dpl/pstl/execution_impl.h - fix review comment: What? …
Mar 13, 2024
3b3a4d2
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_fpga.h - f…
Mar 13, 2024
133b7f7
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 13, 2024
2420ee7
fix review comment: Is this void at the very end because we now have …
Mar 13, 2024
a642e39
Apply GitHUB clang format
Mar 13, 2024
b853589
Fix review comment: replace ::std::decay_t<decltype(__dispatch_tag)> …
Mar 13, 2024
0146aa6
include/oneapi/dpl/pstl/hetero/algorithm_impl_hetero.h - fix review c…
Mar 13, 2024
726e5e3
include/oneapi/dpl/pstl/hetero/algorithm_impl_hetero.h - fix review c…
Mar 13, 2024
cd807f1
include/oneapi/dpl/pstl/omp/parallel_scan.h - fix review comment
Mar 13, 2024
96621e9
test/parallel_api/experimental/for_loop_reduction.pass.cpp - revert c…
Mar 13, 2024
d97ff47
test/parallel_api/experimental/for_loop.pass.cpp - revert changes fro…
Mar 13, 2024
079a7f5
test/parallel_api/experimental/for_loop_induction.pass.cpp - revert c…
Mar 13, 2024
ee0433e
Revert changes from __buffer_impl classes (partial)
Mar 14, 2024
02a6bae
include/oneapi/dpl/pstl/execution_impl.h - revert changes from __buff…
Mar 14, 2024
48aec87
Revert changes from __buffer_impl classes (partial) - calls
Mar 14, 2024
0c8fdbe
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - fix c…
Mar 14, 2024
2bc44ca
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - fix c…
Mar 14, 2024
dd72781
include/oneapi/dpl/pstl/experimental/internal/for_loop_impl.h - fix c…
Mar 14, 2024
0bd539c
Disable `for_loop` staff for hetero policies (#1447)
SergeyKopienko Mar 14, 2024
68fdd8f
Fix review comment: extra static_assert checks removed.
Mar 15, 2024
dae0918
include/oneapi/dpl/pstl/algorithm_impl.h - fix review comment: captur…
Mar 15, 2024
ff10491
include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h - fix r…
Mar 15, 2024
f1eba8a
Merge branch 'main' into dev/skopienko/tag_dispatching
Mar 15, 2024
86a59e6
Fix compile errors in `ranges` tests (#1450)
SergeyKopienko Mar 18, 2024
ea59cb3
Fix review comments for tag dispatching (#1451)
SergeyKopienko Mar 18, 2024
e26873b
include/oneapi/dpl/pstl/iterator_defs.h - remove template alias __is_…
Mar 20, 2024
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
118 changes: 59 additions & 59 deletions include/oneapi/dpl/internal/async_impl/async_impl_hetero.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ namespace dpl
namespace __internal
{

template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Function,
oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _ForwardIterator, typename _Function>
auto
__pattern_walk1_async(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f)
__pattern_walk1_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _ForwardIterator __first,
_ForwardIterator __last, _Function __f)
{
auto __n = __last - __first;
assert(__n > 0);
Expand All @@ -43,19 +43,19 @@ __pattern_walk1_async(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Forw
auto __buf = __keep(__first, __last);

auto __future_obj = oneapi::dpl::__par_backend_hetero::__parallel_for(
::std::forward<_ExecutionPolicy>(__exec), unseq_backend::walk_n<_ExecutionPolicy, _Function>{__f}, __n,
__buf.all_view());
_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec),
unseq_backend::walk_n<_ExecutionPolicy, _Function>{__f}, __n, __buf.all_view());
return __future_obj;
}

template <typename _IsSync = ::std::false_type,
__par_backend_hetero::access_mode __acc_mode1 = __par_backend_hetero::access_mode::read,
__par_backend_hetero::access_mode __acc_mode2 = __par_backend_hetero::access_mode::write,
typename _ExecutionPolicy, typename _ForwardIterator1, typename _ForwardIterator2, typename _Function,
oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
typename _BackendTag, typename _ExecutionPolicy, typename _ForwardIterator1, typename _ForwardIterator2,
typename _Function>
auto
__pattern_walk2_async(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _Function __f)
__pattern_walk2_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _ForwardIterator1 __first1,
_ForwardIterator1 __last1, _ForwardIterator2 __first2, _Function __f)
{
auto __n = __last1 - __first1;
assert(__n > 0);
Expand All @@ -67,20 +67,20 @@ __pattern_walk2_async(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Fo
auto __buf2 = __keep2(__first2, __first2 + __n);

auto __future = oneapi::dpl::__par_backend_hetero::__parallel_for(
::std::forward<_ExecutionPolicy>(__exec), unseq_backend::walk_n<_ExecutionPolicy, _Function>{__f}, __n,
__buf1.all_view(), __buf2.all_view());
_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec),
unseq_backend::walk_n<_ExecutionPolicy, _Function>{__f}, __n, __buf1.all_view(), __buf2.all_view());

if constexpr (_IsSync::value)
__future.wait();

return __future.__make_future(__first2 + __n);
}

template <typename _ExecutionPolicy, typename _ForwardIterator1, typename _ForwardIterator2, typename _ForwardIterator3,
typename _Function, oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _ForwardIterator1, typename _ForwardIterator2,
typename _ForwardIterator3, typename _Function>
auto
__pattern_walk3_async(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator3 __first3, _Function __f)
__pattern_walk3_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _ForwardIterator1 __first1,
_ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator3 __first3, _Function __f)
{
auto __n = __last1 - __first1;
assert(__n > 0);
Expand All @@ -95,20 +95,22 @@ __pattern_walk3_async(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Fo
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, _ForwardIterator3>();
auto __buf3 = __keep3(__first3, __first3 + __n);

auto __future = oneapi::dpl::__par_backend_hetero::__parallel_for(
::std::forward<_ExecutionPolicy>(__exec), unseq_backend::walk_n<_ExecutionPolicy, _Function>{__f}, __n,
__buf1.all_view(), __buf2.all_view(), __buf3.all_view());
auto __future =
oneapi::dpl::__par_backend_hetero::__parallel_for(_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec),
unseq_backend::walk_n<_ExecutionPolicy, _Function>{__f}, __n,
__buf1.all_view(), __buf2.all_view(), __buf3.all_view());

return __future.__make_future(__first3 + __n);
}

template <typename _ExecutionPolicy, typename _ForwardIterator1, typename _ForwardIterator2, typename _Brick,
oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _ForwardIterator1, typename _ForwardIterator2,
typename _Brick>
auto
__pattern_walk2_brick_async(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _Brick __brick)
__pattern_walk2_brick_async(__hetero_tag<_BackendTag> __tag, _ExecutionPolicy&& __exec, _ForwardIterator1 __first1,
_ForwardIterator1 __last1, _ForwardIterator2 __first2, _Brick __brick)
{
return __pattern_walk2_async(
__tag,
__par_backend_hetero::make_wrapped_policy<__walk2_brick_wrapper>(::std::forward<_ExecutionPolicy>(__exec)),
__first1, __last1, __first2, __brick);
}
Expand All @@ -117,11 +119,10 @@ __pattern_walk2_brick_async(_ExecutionPolicy&& __exec, _ForwardIterator1 __first
// transform_reduce (version with two binary functions)
//------------------------------------------------------------------------

template <typename _ExecutionPolicy, typename _RandomAccessIterator1, typename _RandomAccessIterator2, typename _Tp,
typename _BinaryOperation1, typename _BinaryOperation2,
oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _RandomAccessIterator1,
typename _RandomAccessIterator2, typename _Tp, typename _BinaryOperation1, typename _BinaryOperation2>
auto
__pattern_transform_reduce_async(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1,
__pattern_transform_reduce_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1,
_RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2, _Tp __init,
_BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
{
Expand All @@ -141,7 +142,7 @@ __pattern_transform_reduce_async(_ExecutionPolicy&& __exec, _RandomAccessIterato

return oneapi::dpl::__par_backend_hetero::__parallel_transform_reduce<_RepackedTp,
::std::true_type /*is_commutative*/>(
::std::forward<_ExecutionPolicy>(__exec), __binary_op1, _Functor{__binary_op2},
_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec), __binary_op1, _Functor{__binary_op2},
unseq_backend::__init_value<_RepackedTp>{__init}, // initial value
__buf1.all_view(), __buf2.all_view());
}
Expand All @@ -150,12 +151,12 @@ __pattern_transform_reduce_async(_ExecutionPolicy&& __exec, _RandomAccessIterato
// transform_reduce (with unary and binary functions)
//------------------------------------------------------------------------

template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Tp, typename _BinaryOperation,
typename _UnaryOperation,
oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _ForwardIterator, typename _Tp,
typename _BinaryOperation, typename _UnaryOperation>
auto
__pattern_transform_reduce_async(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last,
_Tp __init, _BinaryOperation __binary_op, _UnaryOperation __unary_op)
__pattern_transform_reduce_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _ForwardIterator __first,
_ForwardIterator __last, _Tp __init, _BinaryOperation __binary_op,
_UnaryOperation __unary_op)
{
assert(__first < __last);

Expand All @@ -168,18 +169,18 @@ __pattern_transform_reduce_async(_ExecutionPolicy&& __exec, _ForwardIterator __f

return oneapi::dpl::__par_backend_hetero::__parallel_transform_reduce<_RepackedTp,
::std::true_type /*is_commutative*/>(
::std::forward<_ExecutionPolicy>(__exec), __binary_op, _Functor{__unary_op},
_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec), __binary_op, _Functor{__unary_op},
unseq_backend::__init_value<_RepackedTp>{__init}, // initial value
__buf.all_view());
}

template <typename _ExecutionPolicy, typename _ForwardIterator, typename _T,
oneapi::dpl::__internal::__enable_if_device_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _ForwardIterator, typename _T>
auto
__pattern_fill_async(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _T& __value)
__pattern_fill_async(__hetero_tag<_BackendTag> __tag, _ExecutionPolicy&& __exec, _ForwardIterator __first,
_ForwardIterator __last, const _T& __value)
{
return __pattern_walk1_async(
::std::forward<_ExecutionPolicy>(__exec),
__tag, ::std::forward<_ExecutionPolicy>(__exec),
__par_backend_hetero::make_iter_mode<__par_backend_hetero::access_mode::write>(__first),
__par_backend_hetero::make_iter_mode<__par_backend_hetero::access_mode::write>(__last),
fill_functor<_T>{__value});
Expand All @@ -189,13 +190,12 @@ __pattern_fill_async(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Forwa
// transform_scan
//------------------------------------------------------------------------

template <typename _ExecutionPolicy, typename _Iterator1, typename _Iterator2, typename _UnaryOperation,
typename _InitType, typename _BinaryOperation, typename _Inclusive,
oneapi::dpl::__internal::__enable_if_hetero_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _Iterator1, typename _Iterator2,
typename _UnaryOperation, typename _InitType, typename _BinaryOperation, typename _Inclusive>
auto
__pattern_transform_scan_base_async(_ExecutionPolicy&& __exec, _Iterator1 __first, _Iterator1 __last,
_Iterator2 __result, _UnaryOperation __unary_op, _InitType __init,
_BinaryOperation __binary_op, _Inclusive)
__pattern_transform_scan_base_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _Iterator1 __first,
_Iterator1 __last, _Iterator2 __result, _UnaryOperation __unary_op,
_InitType __init, _BinaryOperation __binary_op, _Inclusive)
{
assert(__first < __last);

Expand All @@ -206,39 +206,39 @@ __pattern_transform_scan_base_async(_ExecutionPolicy&& __exec, _Iterator1 __firs
auto __buf2 = __keep2(__result, __result + __n);

auto __res = oneapi::dpl::__par_backend_hetero::__parallel_transform_scan(
::std::forward<_ExecutionPolicy>(__exec), __buf1.all_view(), __buf2.all_view(), __n, __unary_op, __init,
__binary_op, _Inclusive{});
_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec), __buf1.all_view(), __buf2.all_view(), __n, __unary_op,
__init, __binary_op, _Inclusive{});
return __res.__make_future(__result + __n);
}

template <typename _ExecutionPolicy, typename _Iterator1, typename _Iterator2, typename _UnaryOperation, typename _Type,
typename _BinaryOperation, typename _Inclusive,
oneapi::dpl::__internal::__enable_if_hetero_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _Iterator1, typename _Iterator2,
typename _UnaryOperation, typename _Type, typename _BinaryOperation, typename _Inclusive>
auto
__pattern_transform_scan_async(_ExecutionPolicy&& __exec, _Iterator1 __first, _Iterator1 __last, _Iterator2 __result,
_UnaryOperation __unary_op, _Type __init, _BinaryOperation __binary_op, _Inclusive)
__pattern_transform_scan_async(__hetero_tag<_BackendTag> __tag, _ExecutionPolicy&& __exec, _Iterator1 __first,
_Iterator1 __last, _Iterator2 __result, _UnaryOperation __unary_op, _Type __init,
_BinaryOperation __binary_op, _Inclusive)
{
using _RepackedType = __par_backend_hetero::__repacked_tuple_t<_Type>;
using _InitType = unseq_backend::__init_value<_RepackedType>;

return __pattern_transform_scan_base_async(::std::forward<_ExecutionPolicy>(__exec), __first, __last, __result,
__unary_op, _InitType{__init}, __binary_op, _Inclusive{});
return __pattern_transform_scan_base_async(__tag, ::std::forward<_ExecutionPolicy>(__exec), __first, __last,
__result, __unary_op, _InitType{__init}, __binary_op, _Inclusive{});
}

// scan without initial element
template <typename _ExecutionPolicy, typename _Iterator1, typename _Iterator2, typename _UnaryOperation,
typename _BinaryOperation, typename _Inclusive,
oneapi::dpl::__internal::__enable_if_hetero_execution_policy<_ExecutionPolicy, int> = 0>
template <typename _BackendTag, typename _ExecutionPolicy, typename _Iterator1, typename _Iterator2,
typename _UnaryOperation, typename _BinaryOperation, typename _Inclusive>
auto
__pattern_transform_scan_async(_ExecutionPolicy&& __exec, _Iterator1 __first, _Iterator1 __last, _Iterator2 __result,
_UnaryOperation __unary_op, _BinaryOperation __binary_op, _Inclusive)
__pattern_transform_scan_async(__hetero_tag<_BackendTag> __tag, _ExecutionPolicy&& __exec, _Iterator1 __first,
_Iterator1 __last, _Iterator2 __result, _UnaryOperation __unary_op,
_BinaryOperation __binary_op, _Inclusive)
{
using _ValueType = typename ::std::iterator_traits<_Iterator1>::value_type;
using _RepackedType = __par_backend_hetero::__repacked_tuple_t<_ValueType>;
using _InitType = unseq_backend::__no_init_value<_RepackedType>;

return __pattern_transform_scan_base_async(::std::forward<_ExecutionPolicy>(__exec), __first, __last, __result,
__unary_op, _InitType{}, __binary_op, _Inclusive{});
return __pattern_transform_scan_base_async(__tag, ::std::forward<_ExecutionPolicy>(__exec), __first, __last,
__result, __unary_op, _InitType{}, __binary_op, _Inclusive{});
}

} // namespace __internal
Expand Down
Loading
Loading