32 template<alpaka::onAcc::concepts::Acc T_Acc>
33 constexpr auto activemask(T_Acc
const& acc) -> std::conditional_t<T_Acc::getWarpSize() <= 32u, uint32_t, uint64_t>
37 return internal::Activemask::Op<Acc, Api>{}(acc, Api{});
43 return internal::getLaneIdx(acc);
49 return internal::getWarpIdx(acc);
68 return internal::All::Op<Acc, Api>{}(acc, Api{}, predicate);
87 return internal::Any::Op<Acc, Api>{}(acc, Api{}, predicate);
106 template<alpaka::onAcc::concepts::Acc T_Acc>
107 constexpr auto ballot(T_Acc
const& acc, int32_t predicate)
108 -> std::conditional_t<T_Acc::getWarpSize() <= 32u, uint32_t, uint64_t>
112 return internal::Ballot::Op<Acc, Api>{}(acc, Api{}, predicate);
121 template<concepts::Acc T_Acc>
124 return internal::getSize<T_Acc>();
127 template<concepts::Acc T_Acc>
130 return T_Acc::getWarpSize();
156 template<
typename T, alpaka::onAcc::concepts::Acc T_Acc>
157 requires(std::is_trivially_copyable_v<T>)
158 constexpr T
shfl(T_Acc
const& acc, T
const& value, uint32_t srcLane, uint32_t width =
getSize<T_Acc>())
162 return internal::Shfl::Op<Acc, Api, T>{}(acc, Api{}, value, srcLane, width != 0u ? width :
getSize<T_Acc>());
192 template<
typename T, alpaka::onAcc::concepts::Acc T_Acc>
193 requires(std::is_trivially_copyable_v<T>)
198 return internal::ShflDown::Op<Acc, Api, T>{}(acc, Api{}, value, delta, width != 0u ? width :
getSize<T_Acc>());
227 template<
typename T, alpaka::onAcc::concepts::Acc T_Acc>
228 requires(std::is_trivially_copyable_v<T>)
233 return internal::ShflUp::Op<Acc, Api, T>{}(acc, Api{}, value, delta, width != 0u ? width :
getSize<T_Acc>());
264 template<
typename T, alpaka::onAcc::concepts::Acc T_Acc>
265 requires(std::is_trivially_copyable_v<T>)
270 return internal::ShflXor::Op<Acc, Api, T>{}(
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Concept to check if a type is an accelerator.
constexpr uint32_t getLaneIdx(alpaka::onAcc::concepts::Acc auto const &acc)
Return the lane index of the current thread within its warp.
constexpr bool any(alpaka::onAcc::concepts::Acc auto const &acc, int32_t predicate)
Evaluates predicate for all active threads of the warp.
constexpr T shflDown(T_Acc const &acc, T const &value, uint32_t delta, uint32_t width=getSize< T_Acc >())
Read data from threads with higher lane index within a warp.
constexpr T shfl(T_Acc const &acc, T const &value, uint32_t srcLane, uint32_t width=getSize< T_Acc >())
Exchange data between threads within a warp.
constexpr bool all(alpaka::onAcc::concepts::Acc auto const &acc, int32_t predicate)
Evaluates predicate for all active threads of the warp.
constexpr uint32_t getWarpIdx(alpaka::onAcc::concepts::Acc auto const &acc)
Return the warp index within the block.
constexpr T shflUp(T_Acc const &acc, T const &value, uint32_t delta, uint32_t width=getSize< T_Acc >())
Read data from threads with lower lane index within a warp.
constexpr auto ballot(T_Acc const &acc, int32_t predicate) -> std::conditional_t< T_Acc::getWarpSize()<=32u, uint32_t, uint64_t >
Evaluates predicate for all non-exited threads in a warp and returns a 32- or 64-bit unsigned integer...
constexpr auto activemask(T_Acc const &acc) -> std::conditional_t< T_Acc::getWarpSize()<=32u, uint32_t, uint64_t >
Return the bit-mask of active lanes for the warp associated with the accelerator.
constexpr uint32_t getSize()
Return the warp size.
constexpr T shflXor(T_Acc const &acc, T const &value, uint32_t laneMask, uint32_t width=getSize< T_Acc >())
Exchange data between threads within a warp.