Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions include/oneapi/dpl/experimental/kt/esimd_radix_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ radix_sort(sycl::queue __q, _KeysIterator __keys_first, _KeysIterator __keys_las
if (__keys_last - __keys_first < 2)
return {};

auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeysIterator>();
auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_rng = __keys_keep(__keys_first, __keys_last).all_view();
auto __pack = __impl::__rng_pack{::std::move(__keys_rng)};
return __impl::__radix_sort<__is_ascending, __radix_bits, /*__in_place=*/true>(__q, __pack, __pack, __param);
Expand Down Expand Up @@ -77,10 +77,10 @@ radix_sort_by_key(sycl::queue __q, _KeysIterator __keys_first, _KeysIterator __k
if (__keys_last - __keys_first < 2)
return {};

auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeysIterator>();
auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_rng = __keys_keep(__keys_first, __keys_last).all_view();

auto __vals_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _ValsIterator>();
auto __vals_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __vals_rng = __vals_keep(__vals_first, __vals_first + (__keys_last - __keys_first)).all_view();
auto __pack = __impl::__rng_pack{::std::move(__keys_rng), ::std::move(__vals_rng)};
return __impl::__radix_sort<__is_ascending, __radix_bits, /*__in_place=*/true>(__q, __pack, __pack, __param);
Expand Down Expand Up @@ -113,10 +113,10 @@ radix_sort(sycl::queue __q, _KeysIterator1 __keys_first, _KeysIterator1 __keys_l
if (__n == 0)
return {};

auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeysIterator1>();
auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_rng = __keys_keep(__keys_first, __keys_last).all_view();
auto __pack = __impl::__rng_pack{::std::move(__keys_rng)};
auto __keys_out_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeysIterator2>();
auto __keys_out_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_out_rng = __keys_out_keep(__keys_out_first, __keys_out_first + __n).all_view();
auto __pack_out = __impl::__rng_pack{::std::move(__keys_out_rng)};
return __impl::__radix_sort<__is_ascending, __radix_bits, /*__in_place=*/false>(__q, ::std::move(__pack),
Expand Down Expand Up @@ -153,18 +153,18 @@ radix_sort_by_key(sycl::queue __q, _KeysIterator1 __keys_first, _KeysIterator1 _
if (__n == 0)
return {};

auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeysIterator1>();
auto __keys_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_rng = __keys_keep(__keys_first, __keys_last).all_view();

auto __vals_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _ValsIterator1>();
auto __vals_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __vals_rng = __vals_keep(__vals_first, __vals_first + __n).all_view();
auto __pack = __impl::__rng_pack{::std::move(__keys_rng), ::std::move(__vals_rng)};

auto __keys_out_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeysIterator2>();
auto __keys_out_rng = __keys_keep(__keys_out_first, __keys_out_first + __n).all_view();
auto __keys_out_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_out_rng = __keys_out_keep(__keys_out_first, __keys_out_first + __n).all_view();

auto __vals_out_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _ValsIterator2>();
auto __vals_out_rng = __vals_keep(__vals_out_first, __vals_out_first + __n).all_view();
auto __vals_out_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __vals_out_rng = __vals_out_keep(__vals_out_first, __vals_out_first + __n).all_view();
auto __pack_out = __impl::__rng_pack{::std::move(__keys_out_rng), ::std::move(__vals_out_rng)};
return __impl::__radix_sort<__is_ascending, __radix_bits, /*__in_place=*/false>(__q, ::std::move(__pack),
::std::move(__pack_out), __param);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,12 @@ __onesweep(sycl::queue __q, _RngPack1&& __pack, _RngPack2&& __pack_out, ::std::s
__mem_holder.__allocate();

auto __get_tmp_pack = [&]() {
auto __keys_tmp_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _KeyT*>();
auto __keys_tmp_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __keys_tmp_rng = __keys_tmp_keep(__mem_holder.__keys_ptr(), __mem_holder.__keys_ptr() + __n).all_view();

if constexpr (__has_values)
{
auto __vals_tmp_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write, _ValT*>();
auto __vals_tmp_keep = oneapi::dpl::__ranges::__get_sycl_range<sycl::access_mode::read_write>();
auto __vals_tmp_rng =
__vals_tmp_keep(__mem_holder.__vals_ptr(), __mem_holder.__vals_ptr() + __n).all_view();
return __rng_pack(::std::move(__keys_tmp_rng), ::std::move(__vals_tmp_rng));
Expand Down
5 changes: 3 additions & 2 deletions include/oneapi/dpl/experimental/kt/single_pass_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ inclusive_scan(sycl::queue __queue, _InIterator __in_begin, _InIterator __in_end
{
auto __n = __in_end - __in_begin;

auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _InIterator>();
auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf1 = __keep1(__in_begin, __in_end);
auto __keep2 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, _OutIterator>();
auto __keep2 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, /*_NoInit=*/true>();
auto __buf2 = __keep2(__out_begin, __out_begin + __n);

return __impl::__single_pass_scan<true>(__queue, __buf1.all_view(), __buf2.all_view(), __binary_op, __param);
Expand Down
28 changes: 12 additions & 16 deletions include/oneapi/dpl/internal/async_impl/async_impl_hetero.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ __pattern_walk1_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _For
auto __n = __last - __first;
assert(__n > 0);

auto __keep =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read_write, _ForwardIterator>();
auto __keep = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read_write>();
auto __buf = __keep(__first, __last);

auto __future_obj = oneapi::dpl::__par_backend_hetero::__parallel_for(
Expand All @@ -59,10 +58,10 @@ __pattern_walk2_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _For
auto __n = __last1 - __first1;
assert(__n > 0);

auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__acc_mode1, _ForwardIterator1>();
auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__acc_mode1>();
auto __buf1 = __keep1(__first1, __last1);

auto __keep2 = oneapi::dpl::__ranges::__get_sycl_range<__acc_mode2, _ForwardIterator2>();
auto __keep2 = oneapi::dpl::__ranges::__get_sycl_range<__acc_mode2>();
auto __buf2 = __keep2(__first2, __first2 + __n);

auto __future = oneapi::dpl::__par_backend_hetero::__parallel_for(
Expand All @@ -82,14 +81,12 @@ __pattern_walk3_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _For
auto __n = __last1 - __first1;
assert(__n > 0);

auto __keep1 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _ForwardIterator1>();
auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf1 = __keep1(__first1, __last1);
auto __keep2 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _ForwardIterator2>();
auto __keep2 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf2 = __keep2(__first2, __first2 + __n);
auto __keep3 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, _ForwardIterator3>();
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, /*_NoInit=*/true>();
auto __buf3 = __keep3(__first3, __first3 + __n);

auto __future = oneapi::dpl::__par_backend_hetero::__parallel_for(
Expand Down Expand Up @@ -129,11 +126,9 @@ __pattern_transform_reduce_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& _
using _RepackedTp = __par_backend_hetero::__repacked_tuple_t<_Tp>;

auto __n = __last1 - __first1;
auto __keep1 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _RandomAccessIterator1>();
auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf1 = __keep1(__first1, __last1);
auto __keep2 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _RandomAccessIterator2>();
auto __keep2 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf2 = __keep2(__first2, __first2 + __n);

return oneapi::dpl::__par_backend_hetero::__parallel_transform_reduce<_RepackedTp,
Expand All @@ -159,7 +154,7 @@ __pattern_transform_reduce_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&& _
using _Functor = unseq_backend::walk_n<_UnaryOperation>;
using _RepackedTp = __par_backend_hetero::__repacked_tuple_t<_Tp>;

auto __keep = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _ForwardIterator>();
auto __keep = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf = __keep(__first, __last);

return oneapi::dpl::__par_backend_hetero::__parallel_transform_reduce<_RepackedTp,
Expand Down Expand Up @@ -195,9 +190,10 @@ __pattern_transform_scan_base_async(__hetero_tag<_BackendTag>, _ExecutionPolicy&
assert(__first < __last);

auto __n = __last - __first;
auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read, _Iterator1>();
auto __keep1 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read>();
auto __buf1 = __keep1(__first, __last);
auto __keep2 = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, _Iterator2>();
auto __keep2 =
oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::write, /*_NoInit=*/true>();
auto __buf2 = __keep2(__result, __result + __n);

auto __res = oneapi::dpl::__par_backend_hetero::__parallel_transform_scan(
Expand Down
2 changes: 1 addition & 1 deletion include/oneapi/dpl/internal/async_impl/glue_async_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ sort_async(_ExecutionPolicy&& __exec, _Iterator __first, _Iterator __last, _Comp
wait_for_all(::std::forward<_Events>(__dependencies)...);
assert(__last - __first >= 2);

auto __keep = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read_write, _Iterator>();
auto __keep = oneapi::dpl::__ranges::__get_sycl_range<__par_backend_hetero::access_mode::read_write>();
auto __buf = __keep(__first, __last);

const auto __dispatch_tag = oneapi::dpl::__internal::__select_backend(__exec, __first);
Expand Down
18 changes: 9 additions & 9 deletions include/oneapi/dpl/internal/binary_search_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ lower_bound_impl(__internal::__hetero_tag<_BackendTag>, Policy&& policy, InputIt

const auto value_size = std::distance(value_start, value_end);

auto keep_input = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read, InputIterator1>();
auto keep_input = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read>();
auto input_buf = keep_input(start, end);

auto keep_values = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read, InputIterator2>();
auto keep_values = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read>();
auto value_buf = keep_values(value_start, value_end);

auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write, OutputIterator>();
auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write>();
auto result_buf = keep_result(result, result + value_size);
auto zip_vw = make_zip_view(input_buf.all_view(), value_buf.all_view(), result_buf.all_view());
const bool use_32bit_indexing = size <= std::numeric_limits<std::uint32_t>::max();
Expand All @@ -226,13 +226,13 @@ upper_bound_impl(__internal::__hetero_tag<_BackendTag>, Policy&& policy, InputIt

const auto value_size = std::distance(value_start, value_end);

auto keep_input = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read, InputIterator1>();
auto keep_input = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read>();
auto input_buf = keep_input(start, end);

auto keep_values = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read, InputIterator2>();
auto keep_values = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read>();
auto value_buf = keep_values(value_start, value_end);

auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write, OutputIterator>();
auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write>();
auto result_buf = keep_result(result, result + value_size);
auto zip_vw = make_zip_view(input_buf.all_view(), value_buf.all_view(), result_buf.all_view());
const bool use_32bit_indexing = size <= std::numeric_limits<std::uint32_t>::max();
Expand All @@ -258,13 +258,13 @@ binary_search_impl(__internal::__hetero_tag<_BackendTag>, Policy&& policy, Input

const auto value_size = std::distance(value_start, value_end);

auto keep_input = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read, InputIterator1>();
auto keep_input = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read>();
auto input_buf = keep_input(start, end);

auto keep_values = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read, InputIterator2>();
auto keep_values = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read>();
auto value_buf = keep_values(value_start, value_end);

auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write, OutputIterator>();
auto keep_result = oneapi::dpl::__ranges::__get_sycl_range<__bknd::access_mode::read_write>();
auto result_buf = keep_result(result, result + value_size);
auto zip_vw = make_zip_view(input_buf.all_view(), value_buf.all_view(), result_buf.all_view());
const bool use_32bit_indexing = size <= std::numeric_limits<std::uint32_t>::max();
Expand Down
Loading