Skip to content

Commit aa2e5ef

Browse files
include/oneapi/dpl/internal/scan_by_segment_impl.h - using _ExecutionPolicy type always first in factories and submitters template parameters
1 parent 88aba56 commit aa2e5ef

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

include/oneapi/dpl/internal/scan_by_segment_impl.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,23 @@ class __seg_scan_wg_kernel;
9898
template <bool __is_inclusive, typename... Name>
9999
class __seg_scan_prefix_kernel;
100100

101-
template <bool __is_inclusive, typename _ExecutionPolicy>
101+
template <typename _ExecutionPolicy, bool __is_inclusive>
102102
struct __sycl_scan_by_segment_submitter;
103103

104104
struct __sycl_scan_by_segment_submitter_factory
105105
{
106-
template <bool __is_inclusive, typename _ExecutionPolicy>
106+
template <typename _ExecutionPolicy, bool __is_inclusive>
107107
static auto
108108
create(_ExecutionPolicy&& __exec)
109109
{
110110
using _ExecutionPolicyCtor = std::decay_t<_ExecutionPolicy>;
111111
static_assert(std::is_same_v<_ExecutionPolicyCtor, std::remove_cv_t<std::remove_reference_t<std::decay_t<_ExecutionPolicy>>>>);
112112

113-
return __sycl_scan_by_segment_submitter<__is_inclusive, _ExecutionPolicyCtor>{std::forward<_ExecutionPolicy>(__exec)};
113+
return __sycl_scan_by_segment_submitter<_ExecutionPolicyCtor, __is_inclusive>{std::forward<_ExecutionPolicy>(__exec)};
114114
}
115115
};
116116

117-
template <bool __is_inclusive, typename _ExecutionPolicy>
117+
template <typename _ExecutionPolicy, bool __is_inclusive>
118118
struct __sycl_scan_by_segment_submitter : protected __sycl_submitter_base<_ExecutionPolicy>
119119
{
120120
friend __sycl_scan_by_segment_submitter_factory;
@@ -418,8 +418,7 @@ __scan_by_segment_impl_common(__internal::__hetero_tag<_BackendTag>, Policy&& po
418418

419419
constexpr iter_value_t identity = unseq_backend::__known_identity<Operator, iter_value_t>;
420420

421-
// TODO spezialisation of Policy type in template params is not required here
422-
__sycl_scan_by_segment_submitter_factory::create<Inclusive::value/*, Policy*/>(policy)(
421+
__sycl_scan_by_segment_submitter_factory::create<Policy, Inclusive::value>(std::forward<Policy>(policy))(
423422
_BackendTag{}, key_buf.all_view(), value_buf.all_view(), value_output_buf.all_view(), binary_pred, binary_op,
424423
init, identity);
425424

0 commit comments

Comments
 (0)