Skip to content

Commit

Permalink
wp
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz committed Oct 5, 2024
1 parent 4e7dbc7 commit ec14b4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions group/group_inclusive_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ class MicroBenchGroupInclusiveScan {
cgh.parallel_for<MicroBenchGroupInclusiveScanKernel<DataT, Iterations>>(
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<DataT>(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<DataT>{});
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<DataT>{});
out[item.get_local_linear_id()] = d;
}
});
}));
Expand Down

0 comments on commit ec14b4b

Please sign in to comment.