alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
TagAccIsEnabled.hpp
Go to the documentation of this file.
1/* Copyright 2025 Simeon Ehrig, Simone Balducci
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
7// include all Acc's because of the struct AccIsEnabled
8// if an acc is not include, it will be not enabled independent of the compiler flags
18#include "alpaka/acc/Tag.hpp"
21
22#include <type_traits>
23
24namespace alpaka
25{
26 //! \brief check if the accelerator is enabled for a given tag
27 //! \tparam TTag alpaka tag type
28 template<concepts::Tag TTag, typename = void>
29 struct AccIsEnabled : std::false_type
30 {
31 };
32
33 template<concepts::Tag TTag>
34 struct AccIsEnabled<TTag, std::void_t<TagToAcc<TTag, alpaka::DimInt<1>, int>>> : std::true_type
35 {
36 };
37
38 //! list of all tags where the related accelerator is enabled
40
41 namespace trait
42 {
43
44 template<concepts::Tag TTag>
45 struct DevType<TTag>
46 {
48 };
49
50 } // namespace trait
51
52} // namespace alpaka
typename detail::FilterImpl< TList, TPred >::type Filter
Definition Filter.hpp:46
The alpaka accelerator library.
alpaka::meta::Filter< AccTags, alpaka::AccIsEnabled > EnabledAccTags
list of all tags where the related accelerator is enabled
STL namespace.
check if the accelerator is enabled for a given tag
typename DevType< alpaka::TagToAcc< TTag, alpaka::DimInt< 1 >, int > >::type type
The device type trait.
Definition Traits.hpp:23