11 #include <type_traits>
20 #define CREATE_ACC_TAG(tag_name) \
21 struct tag_name : public alpaka::InterfaceTag \
23 static std::string get_name() \
46 concept
Tag = requires {
49 } -> std::same_as<std::string>;
50 requires std::default_initializable<T>;
51 requires std::derived_from<T, alpaka::InterfaceTag>;
57 template<
typename TAcc>
60 template<concepts::Tag TTag,
typename TDim,
typename TIdx>
66 template<
typename TAcc>
73 template<concepts::Tag TTag,
typename TDim,
typename TIdx>
77 inline constexpr
bool accMatchesTags = (std::is_same_v<alpaka::AccToTag<TAcc>, TTag> || ...);
94 template<
typename TTuple>
98 if(std::tuple_size_v<TTuple> == 0)
100 std::cout <<
"No Tags!";
104 std::cout <<
"Tags: ";
109 auto index = std::tuple_size_v<TTuple>;
110 ((std::cout << args.get_name() << (--index > 0u ?
"," :
"")), ...);
114 std::cout << std::endl;
#define CREATE_ACC_TAG(tag_name)
The alpaka accelerator library.
std::tuple< alpaka::TagCpuSerial, alpaka::TagCpuThreads, alpaka::TagCpuTbbBlocks, alpaka::TagCpuOmp2Blocks, alpaka::TagCpuOmp2Threads, alpaka::TagGpuCudaRt, alpaka::TagGpuHipRt, alpaka::TagCpuSycl, alpaka::TagFpgaSyclIntel, alpaka::TagGpuSyclIntel > AccTags
list of all available tags
constexpr bool accMatchesTags
void printTagNames()
Function to print the names of each tag in the given tuple of tags.
typename trait::AccToTag< TAcc >::type AccToTag
maps an acc type to a tag type
typename trait::TagToAcc< TTag, TDim, TIdx >::type TagToAcc
maps a tag type to an acc type