From 4e3f7c52b7a635bad6c7800450e50075c8aa6f07 Mon Sep 17 00:00:00 2001 From: Ronan Keryell Date: Wed, 1 Aug 2018 16:52:57 -0700 Subject: [PATCH] Update benchmarks with new member function names from nd_item to match SYCL 1.2.1 rev 3 --- benchmarks/nbody.cpp | 4 ++-- benchmarks/sycl_reduce.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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];