alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
DictTraits.hpp
Go to the documentation of this file.
1/* Copyright 2026 René Widera, Tim Hanel
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
9#include "alpaka/tag.hpp"
10
11namespace alpaka::internal
12{
13 template<typename... T_Entries>
14 requires(Dict<T_Entries...>::hasKey(object::api))
15 struct GetApi::Op<Dict<T_Entries...>>
16 {
17 inline constexpr auto operator()(auto&& any) const
18 {
19 return any[object::api];
20 }
21 };
22
23 template<typename... T_Entries>
24 requires(Dict<T_Entries...>::hasKey(object::exec))
25 struct GetExecutor::Op<Dict<T_Entries...>>
26 {
27 inline constexpr auto operator()(auto&& any) const
28 {
29 return any[object::exec];
30 }
31 };
32
33 template<typename... T_Entries>
34 requires(Dict<T_Entries...>::hasKey(object::deviceKind))
35 struct GetDeviceType::Op<Dict<T_Entries...>>
36 {
37 inline constexpr auto operator()(auto&& any) const
38 {
39 return any[object::deviceKind];
40 }
41 };
42} // namespace alpaka::internal
constexpr DeviceKind deviceKind
Definition tag.hpp:30
constexpr Api api
Definition tag.hpp:24
constexpr bool any(alpaka::onAcc::concepts::Acc auto const &acc, int32_t predicate)
Evaluates predicate for all active threads of the warp.
Definition warp.hpp:83
ALPAKA_FN_HOST_ACC Dict(Tuple< DictEntry< T_Keys, T_Values >... > const &) -> Dict< DictEntry< T_Keys, T_Values >... >