From 985226b54ee23e7884514a9199a3373cccbd56f8 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Fri, 5 Jan 2024 00:16:30 +0100 Subject: [PATCH 1/2] Fix Intel GPU detection --- examples/alpaka/nbody/nbody.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/alpaka/nbody/nbody.cpp b/examples/alpaka/nbody/nbody.cpp index d8ded82eca..2e7bff3caa 100644 --- a/examples/alpaka/nbody/nbody.cpp +++ b/examples/alpaka/nbody/nbody.cpp @@ -231,7 +231,8 @@ struct MoveKernel }; template -constexpr auto hasSharedMem = alpaka::accMatchesTags; +constexpr auto hasSharedMem + = alpaka::accMatchesTags; template void run(std::ostream& plotFile) From dfb21accd724468ca7ba1cdd5dd2644078fe3547 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Fri, 5 Jan 2024 01:50:19 +0100 Subject: [PATCH 2/2] 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));