11#if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)
21# if !defined(ALPAKA_HOST_ONLY)
23# if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) && !BOOST_LANG_CUDA
24# error If ALPAKA_ACC_GPU_CUDA_ENABLED is set, the compiler has to support CUDA!
27# if defined(ALPAKA_ACC_GPU_HIP_ENABLED) && !BOOST_LANG_HIP
28# error If ALPAKA_ACC_GPU_HIP_ENABLED is set, the compiler has to support HIP!
40# if BOOST_COMP_CLANG && BOOST_LANG_CUDA && BOOST_COMP_CLANG < BOOST_VERSION_NUMBER(18, 0, 0)
41 return __popc(
static_cast<int>(value));
43 return static_cast<std::int32_t
>(__popc(
static_cast<unsigned int>(value)));
47 __device__
static auto popcount(IntrinsicUniformCudaHipBuiltIn
const& , std::uint64_t value)
51# if BOOST_COMP_CLANG && BOOST_LANG_CUDA && BOOST_COMP_CLANG < BOOST_VERSION_NUMBER(18, 0, 0)
52 return __popcll(
static_cast<long long>(value));
54 return static_cast<std::int32_t
>(__popcll(
static_cast<unsigned long long>(value)));
60 struct Ffs<IntrinsicUniformCudaHipBuiltIn>
62 __device__
static auto ffs(IntrinsicUniformCudaHipBuiltIn
const& , std::int32_t value)
65 return static_cast<std::int32_t
>(__ffs(
static_cast<int>(value)));
68 __device__
static auto ffs(IntrinsicUniformCudaHipBuiltIn
const& , std::int64_t value)
71 return static_cast<std::int32_t
>(__ffsll(
static_cast<long long>(value)));
The alpaka accelerator library.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto ffs(TIntrinsic const &intrinsic, std::int32_t value) -> std::int32_t
Returns the 1-based position of the least significant bit set to 1 in the given 32-bit value....
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto popcount(TIntrinsic const &intrinsic, std::uint32_t value) -> std::int32_t
Returns the number of 1 bits in the given 32-bit value.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...