Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 6dcbb81

Browse files
keryellRuyman
authored andcommitted
Fix the rank of nd_item in nbody benchmark
A 3D kernel functor was called from a 1D parallel_for... This should fix #78
1 parent f6d0467 commit 6dcbb81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

benchmarks/nbody.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ benchmark<>::time_units_t benchmark_nbody(const unsigned numReps,
156156
auto a_bodies =
157157
d_bodies.get_access<cl::sycl::access::mode::read_write>(h);
158158
h.parallel_for<class NBodyAlgorithm>(
159-
ndRange, [a_bodies, vectorSize](cl::sycl::nd_item<3> id) {
159+
ndRange, [a_bodies, vectorSize](cl::sycl::nd_item<1> id) {
160160
if (id.get_global(0) < vectorSize) {
161161
for (size_t i = 0; i < vectorSize; i++) {
162162
a_bodies[id.get_global(0)].addForce(a_bodies[i]);

0 commit comments

Comments
 (0)