From 1e2c4bcbb83f2c1e030f547a474d70c641920adb Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Fri, 5 Jan 2024 01:50:19 +0100 Subject: [PATCH] Fix wrong shared memory address computation --- examples/alpaka/nbody/nbody.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));