diff --git a/benchmarks/nbody.cpp b/benchmarks/nbody.cpp index bd83a63..3d739f1 100644 --- a/benchmarks/nbody.cpp +++ b/benchmarks/nbody.cpp @@ -157,9 +157,9 @@ benchmark<>::time_units_t benchmark_nbody(const unsigned numReps, d_bodies.get_access(h); h.parallel_for( ndRange, [a_bodies, vectorSize](cl::sycl::nd_item<1> id) { - if (id.get_global(0) < vectorSize) { + if (id.get_global_id(0) < vectorSize) { for (size_t i = 0; i < vectorSize; i++) { - a_bodies[id.get_global(0)].addForce(a_bodies[i]); + a_bodies[id.get_global_id(0)].addForce(a_bodies[i]); } } }); diff --git a/benchmarks/sycl_reduce.cpp b/benchmarks/sycl_reduce.cpp index 2195845..4671c9a 100644 --- a/benchmarks/sycl_reduce.cpp +++ b/benchmarks/sycl_reduce.cpp @@ -77,8 +77,8 @@ benchmark<>::time_units_t benchmark_reduce(const unsigned numReps, h.parallel_for( r, [aI, scratch, local, length](cl::sycl::nd_item<1> id) { - size_t globalid = id.get_global(0); - size_t localid = id.get_local(0); + size_t globalid = id.get_global_id(0); + size_t localid = id.get_local_id(0); if (globalid < length) { scratch[localid] = aI[globalid];