Skip to content

Commit

Permalink
Revert "Declare full specialization of __future return type instead o…
Browse files Browse the repository at this point in the history
…f auto"

This reverts commit 6be8e44.

Signed-off-by: Sergey Kopienko <[email protected]>

# Conflicts:
#	include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_reduce.h
  • Loading branch information
SergeyKopienko committed Sep 25, 2024
1 parent 235d87a commit 3afc10c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ template <typename... _Name>
struct __parallel_for_submitter<__internal::__optional_kernel_name<_Name...>>
{
template <typename _ExecutionPolicy, typename _Fp, typename _Index, typename... _Ranges>
__future<sycl::event>
auto
operator()(_ExecutionPolicy&& __exec, _Fp __brick, _Index __count, _Ranges&&... __rngs) const
{
assert(oneapi::dpl::__ranges::__get_first_range_size(__rngs...) > 0);
Expand All @@ -249,7 +249,7 @@ struct __parallel_for_submitter<__internal::__optional_kernel_name<_Name...>>
//General version of parallel_for, one additional parameter - __count of iterations of loop __cgh.parallel_for,
//for some algorithms happens that size of processing range is n, but amount of iterations is n/2.
template <typename _ExecutionPolicy, typename _Fp, typename _Index, typename... _Ranges>
__future<sycl::event>
auto
__parallel_for(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec, _Fp __brick, _Index __count,
_Ranges&&... __rngs)
{
Expand All @@ -275,7 +275,7 @@ struct __parallel_scan_submitter<_CustomName, __internal::__optional_kernel_name
{
template <typename _ExecutionPolicy, typename _Range1, typename _Range2, typename _BinaryOperation,
typename _InitType, typename _LocalScan, typename _GroupScan, typename _GlobalScan>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, typename _InitType::__value_type>>
auto
operator()(_ExecutionPolicy&& __exec, _Range1&& __rng1, _Range2&& __rng2, _BinaryOperation __binary_op,
_InitType __init, _LocalScan __local_scan, _GroupScan __group_scan, _GlobalScan __global_scan) const
{
Expand Down Expand Up @@ -557,7 +557,7 @@ struct __parallel_copy_if_static_single_group_submitter<_Size, _ElemsPerItem, _W
{
template <typename _Policy, typename _InRng, typename _OutRng, typename _InitType, typename _BinaryOperation,
typename _UnaryOp, typename _Assign>
__future<sycl::event, __result_and_scratch_storage<_Policy, _Size>>
auto
operator()(_Policy&& __policy, _InRng&& __in_rng, _OutRng&& __out_rng, ::std::size_t __n, _InitType __init,
_BinaryOperation __bin_op, _UnaryOp __unary_op, _Assign __assign)
{
Expand Down Expand Up @@ -652,7 +652,7 @@ struct __parallel_copy_if_static_single_group_submitter<_Size, _ElemsPerItem, _W

template <typename _ExecutionPolicy, typename _InRng, typename _OutRng, typename _UnaryOperation, typename _InitType,
typename _BinaryOperation, typename _Inclusive>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, typename _InitType::__value_type>>
auto
__parallel_transform_scan_single_group(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec,
_InRng&& __in_rng, _OutRng&& __out_rng, ::std::size_t __n,
_UnaryOperation __unary_op, _InitType __init, _BinaryOperation __binary_op,
Expand Down Expand Up @@ -746,7 +746,7 @@ __parallel_transform_scan_single_group(oneapi::dpl::__internal::__device_backend

template <typename _ExecutionPolicy, typename _Range1, typename _Range2, typename _BinaryOperation, typename _InitType,
typename _LocalScan, typename _GroupScan, typename _GlobalScan>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, typename _InitType::__value_type>>
auto
__parallel_transform_scan_base(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec,
_Range1&& __in_rng, _Range2&& __out_rng, _BinaryOperation __binary_op, _InitType __init,
_LocalScan __local_scan, _GroupScan __group_scan, _GlobalScan __global_scan)
Expand Down Expand Up @@ -1812,7 +1812,7 @@ struct __parallel_partial_sort_submitter<__internal::__optional_kernel_name<_Glo
__internal::__optional_kernel_name<_CopyBackName...>>
{
template <typename _BackendTag, typename _ExecutionPolicy, typename _Range, typename _Merge, typename _Compare>
__future<sycl::event>
auto
operator()(_BackendTag, _ExecutionPolicy&& __exec, _Range&& __rng, _Merge __merge, _Compare __comp) const
{
using _Tp = oneapi::dpl::__internal::__value_t<_Range>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ template <typename... _Name>
struct __parallel_for_fpga_submitter<__internal::__optional_kernel_name<_Name...>>
{
template <typename _ExecutionPolicy, typename _Fp, typename _Index, typename... _Ranges>
__future<sycl::event>
auto
operator()(_ExecutionPolicy&& __exec, _Fp __brick, _Index __count, _Ranges&&... __rngs) const
{
auto __n = oneapi::dpl::__ranges::__get_first_range_size(__rngs...);
Expand All @@ -80,7 +80,7 @@ struct __parallel_for_fpga_submitter<__internal::__optional_kernel_name<_Name...
};

template <typename _ExecutionPolicy, typename _Fp, typename _Index, typename... _Ranges>
__future<sycl::event>
auto
__parallel_for(oneapi::dpl::__internal::__fpga_backend_tag, _ExecutionPolicy&& __exec, _Fp __brick, _Index __count,
_Ranges&&... __rngs)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ __histogram_general_private_global_atomics(oneapi::dpl::__internal::__device_bac

template <::std::uint16_t __iters_per_work_item, typename _ExecutionPolicy, typename _Range1, typename _Range2,
typename _BinHashMgr>
__future<sycl::event>
auto
__parallel_histogram_select_kernel(oneapi::dpl::__internal::__device_backend_tag __backend_tag,
_ExecutionPolicy&& __exec, const sycl::event& __init_event, _Range1&& __input,
_Range2&& __bins, const _BinHashMgr& __binhash_manager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ template <typename _IdType, typename... _Name>
struct __parallel_merge_submitter<_IdType, __internal::__optional_kernel_name<_Name...>>
{
template <typename _ExecutionPolicy, typename _Range1, typename _Range2, typename _Range3, typename _Compare>
__future<sycl::event>
auto
operator()(_ExecutionPolicy&& __exec, _Range1&& __rng1, _Range2&& __rng2, _Range3&& __rng3, _Compare __comp) const
{
const _IdType __n1 = __rng1.size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct __parallel_sort_submitter<_IdType, __internal::__optional_kernel_name<_Le
__internal::__optional_kernel_name<_CopyBackName...>>
{
template <typename _ExecutionPolicy, typename _Range, typename _Compare, typename _LeafSorter>
__future<sycl::event>
auto
operator()(_ExecutionPolicy&& __exec, _Range&& __rng, _Compare __comp, _LeafSorter& __leaf_sorter) const
{
using _Tp = oneapi::dpl::__internal::__value_t<_Range>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ struct __parallel_radix_sort_iteration
// radix sort: main function
//-----------------------------------------------------------------------
template <bool __is_ascending, typename _Range, typename _ExecutionPolicy, typename _Proj>
__future<sycl::event>
auto
__parallel_radix_sort(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec, _Range&& __in_rng,
_Proj __proj)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct __parallel_transform_reduce_small_submitter<_Tp, _Commutative, _VecSize,
{
template <typename _ExecutionPolicy, typename _Size, typename _ReduceOp, typename _TransformOp, typename _InitType,
typename... _Ranges>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, _Tp>>
auto
operator()(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec, const _Size __n,
const _Size __work_group_size, const _Size __iters_per_work_item, _ReduceOp __reduce_op,
_TransformOp __transform_op, _InitType __init, _Ranges&&... __rngs) const
Expand Down Expand Up @@ -161,7 +161,7 @@ struct __parallel_transform_reduce_small_submitter<_Tp, _Commutative, _VecSize,

template <typename _Tp, typename _Commutative, std::uint8_t _VecSize, typename _ExecutionPolicy, typename _Size,
typename _ReduceOp, typename _TransformOp, typename _InitType, typename... _Ranges>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, _Tp>>
auto
__parallel_transform_reduce_small_impl(oneapi::dpl::__internal::__device_backend_tag __backend_tag,
_ExecutionPolicy&& __exec, const _Size __n, const _Size __work_group_size,
const _Size __iters_per_work_item, _ReduceOp __reduce_op,
Expand Down Expand Up @@ -236,8 +236,8 @@ struct __parallel_transform_reduce_work_group_kernel_submitter<_Tp, _Commutative
{
template <typename _ExecutionPolicy, typename _Size, typename _ReduceOp, typename _InitType,
typename _ExecutionPolicy2>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy2, _Tp>>
operator()(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec, sycl::event&& __reduce_event,
auto
operator()(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec, sycl::event& __reduce_event,
const _Size __n, const _Size __work_group_size, const _Size __iters_per_work_item, _ReduceOp __reduce_op,
_InitType __init, __result_and_scratch_storage<_ExecutionPolicy2, _Tp>& __scratch_container) const
{
Expand Down Expand Up @@ -312,7 +312,7 @@ struct __parallel_transform_reduce_impl
{
template <typename _ExecutionPolicy, typename _Size, typename _ReduceOp, typename _TransformOp, typename _InitType,
typename... _Ranges>
static __future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, _Tp>>
static auto
submit(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec, _Size __n, _Size __work_group_size,
const _Size __iters_per_work_item, _ReduceOp __reduce_op, _TransformOp __transform_op, _InitType __init,
_Ranges&&... __rngs)
Expand Down Expand Up @@ -439,7 +439,7 @@ struct __parallel_transform_reduce_impl
// reduced in each step.
template <typename _Tp, typename _Commutative, typename _ExecutionPolicy, typename _ReduceOp, typename _TransformOp,
typename _InitType, typename... _Ranges>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, _Tp>>
auto
__parallel_transform_reduce(oneapi::dpl::__internal::__device_backend_tag __backend_tag, _ExecutionPolicy&& __exec,
_ReduceOp __reduce_op, _TransformOp __transform_op, _InitType __init, _Ranges&&... __rngs)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ __is_gpu_with_sg_32(const _ExecutionPolicy& __exec)
template <typename _ExecutionPolicy, typename _InRng, typename _OutRng, typename _GenReduceInput, typename _ReduceOp,
typename _GenScanInput, typename _ScanInputTransform, typename _WriteOp, typename _InitType,
typename _Inclusive, typename _IsUniquePattern>
__future<sycl::event, __result_and_scratch_storage<_ExecutionPolicy, typename _InitType::__value_type>>
auto
__parallel_transform_reduce_then_scan(oneapi::dpl::__internal::__device_backend_tag, _ExecutionPolicy&& __exec,
_InRng&& __in_rng, _OutRng&& __out_rng, _GenReduceInput __gen_reduce_input,
_ReduceOp __reduce_op, _GenScanInput __gen_scan_input,
Expand Down

0 comments on commit 3afc10c

Please sign in to comment.