12 #ifdef ALPAKA_ACC_SYCL_ENABLED
14 # include <sycl/sycl.hpp>
19 class IntrinsicGenericSycl :
public interface::Implements<ConceptIntrinsic, IntrinsicGenericSycl>
27 struct Popcount<IntrinsicGenericSycl>
29 static auto popcount(IntrinsicGenericSycl
const&, std::uint32_t value) -> std::int32_t
34 static auto popcount(IntrinsicGenericSycl
const&, std::uint64_t value) -> std::int32_t
41 struct Ffs<IntrinsicGenericSycl>
43 static auto ffs(IntrinsicGenericSycl
const&, std::int32_t value) -> std::int32_t
49 static auto ffs(IntrinsicGenericSycl
const&, std::int64_t value) -> std::int32_t
52 return (value == 0l) ? 0 :
static_cast<std::int32_t
>(
sycl::popcount(value ^ ~(-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.