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

Commit

Permalink
Update benchmarks with new member function names from nd_item to matc…
Browse files Browse the repository at this point in the history
…h SYCL 1.2.1 rev 3
  • Loading branch information
keryell authored and Ruyk committed Aug 9, 2018
1 parent 08ad294 commit 4e3f7c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmarks/nbody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ benchmark<>::time_units_t benchmark_nbody(const unsigned numReps,
d_bodies.get_access<cl::sycl::access::mode::read_write>(h);
h.parallel_for<class NBodyAlgorithm>(
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]);
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/sycl_reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ benchmark<>::time_units_t benchmark_reduce(const unsigned numReps,

h.parallel_for<class ReduceAlgorithmBench>(
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];
Expand Down

0 comments on commit 4e3f7c5

Please sign in to comment.