21 template<
typename T_Storage>
22 struct Acc : T_Storage
24 constexpr Acc(T_Storage
const& storage) : T_Storage{storage}
59 static constexpr bool hasKey(
auto key)
61 constexpr auto idx = alpaka::internal::KeyIdx<
ALPAKA_TYPEOF(key), std::decay_t<T_Storage>>::value;
77 return T_Storage::operator[](object::exec);
95 return ALPAKA_TYPEOF(std::declval<T_Storage>()[object::launchedWidthFrameSpec])::value;
118 template<
typename T_Acc,
typename T_Api = alpaka::NotRequired>
120 && (std::same_as<T_Api, ALPAKA_TYPEOF(std::declval<T_Acc>().getApi())>
121 || std::same_as<T_Api, alpaka::NotRequired>);
125 template<alpaka::concepts::Layer T_Scope>
128 internalCompute::sync(acc,
scope);
151 template<
typename T,
size_t T_uniqueId>
154 return internalCompute::declareSharedVar<T, T_uniqueId>(acc);
172 template<
typename T,
size_t T_uniqueId>
181 constexpr size_t id = T_uniqueId ^ 0x9e37'79b9'7f4a'7c15;
182 constexpr auto alignment =
Alignment<
alignof(T)>{};
199 return internalCompute::declareDynamicSharedMem<T>(acc);
204namespace alpaka::onAcc::internalCompute
207 template<concepts::Acc T_Acc>
208 struct Sync::Op<T_Acc,
alpaka::layer::Block>
212 alpaka::unused(scope);
213 acc[action::threadBlockSync]();
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Concept to check if a type is a CVector.
Validates if T is a specialization of the unspecialized template type U.
Concept to check if a type is a vector.
Concept to check if a type is an accelerator.
constexpr WarpSize warpSize
constexpr DeviceKind deviceKind
functionality which is usable on the accelerator compute device from within a kernel.
constexpr decltype(auto) declareSharedMdArray(concepts::Acc auto const &acc, alpaka::concepts::CVector auto const &extent)
creates an M-dimensional array
constexpr decltype(auto) declareSharedVar(concepts::Acc auto const &acc)
Create a variable located in the thread blocks shared memory.
constexpr auto getDynSharedMem(concepts::Acc auto const &acc) -> T *
Get block shared dynamic memory.
constexpr void syncBlockThreads(concepts::Acc auto const &acc)
Synchronize all threads within a thread block.
constexpr void sync(concepts::Acc auto const &acc, T_Scope scope)
Synchronize all threads within a given scope.
On some constexpr function signatures ALPAKA_FN_HOST_ACC is required for CUDA; otherwise a __host__ f...
Strongly typed and constexpr representation of a byte-alignment of memory.
build C array type with compile time extents from a scalar value based on the compile time extents ve...
constexpr auto getDeviceKind() const
constexpr Acc & operator=(Acc &&)=delete
static constexpr bool hasKey(auto key)
constexpr alpaka::concepts::Vector auto getExtentsOf(concepts::Origin auto origin, concepts::Unit auto unit) const
Get the n-dimensional extents of an origin in the quantity of the selected unit.
constexpr Acc(T_Storage const &storage)
static constexpr bool launchedWithFrameSpec()
Check if a frame spec was used to enqueue the kernel.
constexpr Acc(Acc &&)=delete
constexpr auto getApi() const
constexpr Acc & operator=(Acc const &)=delete
constexpr auto getExecutor() const
constexpr alpaka::concepts::Vector auto getIdxWithin(concepts::Origin auto origin, concepts::Unit auto unit) const
Get the n-dimensional indices within the origin in the quantity of the selected unit.
static constexpr uint32_t getWarpSize()
Get the warp size.
constexpr Acc(Acc const &)=delete