Skip to content

Commit

Permalink
Fix compilation error with multiple accelerators
Browse files Browse the repository at this point in the history
  • Loading branch information
chillenzer committed Feb 5, 2025
1 parent cd4e065 commit a83cd69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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 @@ -148,13 +148,13 @@ namespace mallocMC
#endif

template<typename TAcc>
ALPAKA_FN_ACC inline auto lanemask_lt(TAcc const& /*acc*/)
ALPAKA_FN_ACC inline uint32_t lanemask_lt(TAcc const& /*acc*/)
{
return 0U;
}
#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 All @@ -164,7 +164,7 @@ namespace mallocMC

#ifdef ALPAKA_ACC_GPU_HIP_ENABLED
template<typename TDim, typename TIdx>
ALPAKA_FN_ACC inline auto lanemask_lt(alpaka::AccGpuHipRt<TDim, TIdx> const& /*acc*/)
ALPAKA_FN_ACC inline uint32_t lanemask_lt(alpaka::AccGpuHipRt<TDim, TIdx> const& /*acc*/)
{
return __lanemask_lt();
}
Expand Down

0 comments on commit a83cd69

Please sign in to comment.