Skip to content

Commit 1e2c4bc

Browse files
Fix wrong shared memory address computation
1 parent 9356cf4 commit 1e2c4bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/alpaka/nbody/nbody.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ struct UpdateKernel
204204
for(int blockOffset = 0; blockOffset < problemSize; blockOffset += SharedElementsPerBlock)
205205
{
206206
for(int j = 0; j < SharedElementsPerBlock; j += ThreadsPerBlock)
207-
sharedView(j) = particles(blockOffset + tbi + j);
207+
sharedView(tbi + j) = particles(blockOffset + tbi + j);
208208
alpaka::syncBlockThreads(acc);
209209
for(int j = 0; j < SharedElementsPerBlock; ++j)
210210
pPInteraction(acc, pis, sharedView(j));

0 commit comments

Comments
 (0)