From ec14b4b36c29512b55c02350ebde881c1220e1a6 Mon Sep 17 00:00:00 2001 From: Moritz Date: Sat, 5 Oct 2024 20:45:36 +0200 Subject: [PATCH] wp --- group/group_inclusive_scan.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/group/group_inclusive_scan.cpp b/group/group_inclusive_scan.cpp index 158c454..ececd3e 100644 --- a/group/group_inclusive_scan.cpp +++ b/group/group_inclusive_scan.cpp @@ -46,12 +46,11 @@ class MicroBenchGroupInclusiveScan { cgh.parallel_for>( s::nd_range<1>{num_groups * args.local_size, args.local_size}, [=](cl::sycl::nd_item<1> item) { auto g = item.get_group(); - size_t gid = item.get_global_linear_id(); DataT d = initialize_type(0); - for(int i = Iterations; i >= 0; --i) { - d = s::inclusive_scan_over_group(g, a_[item.get_local_linear_id() + i % args.local_size], cl::sycl::plus{}); - out[gid] = d; + for(int i = 0; i < Iterations; ++i) { + d = s::inclusive_scan_over_group(g, a_[item.get_local_linear_id()], cl::sycl::plus{}); + out[item.get_local_linear_id()] = d; } }); }));