Skip to content

Commit 205c124

Browse files
committed
Fix the problem with lambda functions passed to parallel_for
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent f0d0716 commit 205c124

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sycl/include/CL/sycl/ONEAPI/reduction.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,9 +1269,10 @@ void reduCGFuncImpl(handler &CGH, KernelType KernelFunc,
12691269
auto IdentitiesTuple = getReduIdentities(ReduTuple, ReduIndices);
12701270
auto BOPsTuple = getReduBOPs(ReduTuple, ReduIndices);
12711271

1272-
using Name = typename get_reduction_main_kernel_name_t<
1273-
KernelName, KernelType, UniformPow2WG, IsOneWG,
1274-
std::tuple<Reductions...>>::name;
1272+
using Name =
1273+
typename get_reduction_main_kernel_name_t<KernelName, KernelType,
1274+
UniformPow2WG, IsOneWG,
1275+
decltype(OutAccsTuple)>::name;
12751276
CGH.parallel_for<Name>(Range, [=](nd_item<Dims> NDIt) {
12761277
auto ReduIndices = std::index_sequence_for<Reductions...>();
12771278
auto ReducersTuple =
@@ -1403,7 +1404,7 @@ void reduAuxCGFuncImpl(handler &CGH, size_t NWorkItems, size_t NWorkGroups,
14031404
using Name =
14041405
typename get_reduction_aux_kernel_name_t<KernelName, KernelType,
14051406
UniformPow2WG, IsOneWG,
1406-
std::tuple<Reductions...>>::name;
1407+
decltype(OutAccsTuple)>::name;
14071408
range<1> GlobalRange = {UniformPow2WG ? NWorkItems : NWorkGroups * WGSize};
14081409
nd_range<1> Range{GlobalRange, range<1>(WGSize)};
14091410
CGH.parallel_for<Name>(Range, [=](nd_item<1> NDIt) {

0 commit comments

Comments
 (0)