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

Commit 4e3f7c5

Browse files
keryellRuyman
authored andcommitted
Update benchmarks with new member function names from nd_item to match SYCL 1.2.1 rev 3
1 parent 08ad294 commit 4e3f7c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

benchmarks/nbody.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ benchmark<>::time_units_t benchmark_nbody(const unsigned numReps,
157157
d_bodies.get_access<cl::sycl::access::mode::read_write>(h);
158158
h.parallel_for<class NBodyAlgorithm>(
159159
ndRange, [a_bodies, vectorSize](cl::sycl::nd_item<1> id) {
160-
if (id.get_global(0) < vectorSize) {
160+
if (id.get_global_id(0) < vectorSize) {
161161
for (size_t i = 0; i < vectorSize; i++) {
162-
a_bodies[id.get_global(0)].addForce(a_bodies[i]);
162+
a_bodies[id.get_global_id(0)].addForce(a_bodies[i]);
163163
}
164164
}
165165
});

benchmarks/sycl_reduce.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ benchmark<>::time_units_t benchmark_reduce(const unsigned numReps,
7777

7878
h.parallel_for<class ReduceAlgorithmBench>(
7979
r, [aI, scratch, local, length](cl::sycl::nd_item<1> id) {
80-
size_t globalid = id.get_global(0);
81-
size_t localid = id.get_local(0);
80+
size_t globalid = id.get_global_id(0);
81+
size_t localid = id.get_local_id(0);
8282

8383
if (globalid < length) {
8484
scratch[localid] = aI[globalid];

0 commit comments

Comments
 (0)