diff --git a/examples/alpaka/nbody/nbody.cpp b/examples/alpaka/nbody/nbody.cpp index 2e7bff3caa..7b76638fdb 100644 --- a/examples/alpaka/nbody/nbody.cpp +++ b/examples/alpaka/nbody/nbody.cpp @@ -204,7 +204,7 @@ struct UpdateKernel for(int blockOffset = 0; blockOffset < problemSize; blockOffset += SharedElementsPerBlock) { for(int j = 0; j < SharedElementsPerBlock; j += ThreadsPerBlock) - sharedView(j) = particles(blockOffset + tbi + j); + sharedView(tbi + j) = particles(blockOffset + tbi + j); alpaka::syncBlockThreads(acc); for(int j = 0; j < SharedElementsPerBlock; ++j) pPInteraction(acc, pis, sharedView(j));