Skip to content

Commit

Permalink
Merge pull request #282 from chillenzer/fix-cuda-only-mode-necessity
Browse files Browse the repository at this point in the history
Fix compilation error with multiple accelerators
  • Loading branch information
psychocoderHPC authored Feb 6, 2025
2 parents a35207d + 9705fa1 commit 1feba07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/mallocMC/mallocMC_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace mallocMC

#ifdef ALPAKA_ACC_GPU_CUDA_ENABLED
template<typename TDim, typename TIdx>
ALPAKA_FN_ACC inline auto smid(alpaka::AccGpuCudaRt<TDim, TIdx> const& /*acc*/) -> uint32_t
inline __device__ auto smid(alpaka::AccGpuCudaRt<TDim, TIdx> const& /*acc*/) -> uint32_t
{
std::uint32_t mysmid = 0;
asm("mov.u32 %0, %%smid;" : "=r"(mysmid));
Expand All @@ -154,7 +154,7 @@ namespace mallocMC
}
#ifdef ALPAKA_ACC_GPU_CUDA_ENABLED
template<typename TDim, typename TIdx>
ALPAKA_FN_ACC inline auto lanemask_lt(alpaka::AccGpuCudaRt<TDim, TIdx> const& /*acc*/)
inline __device__ uint32_t lanemask_lt(alpaka::AccGpuCudaRt<TDim, TIdx> const& /*acc*/)
{
std::uint32_t lanemask;
asm("mov.u32 %0, %%lanemask_lt;" : "=r"(lanemask));
Expand Down

0 comments on commit 1feba07

Please sign in to comment.