alpaka
Abstraction Library for Parallel Kernel Acceleration
TagAccIsEnabled.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // include all Acc's because of the struct AccIsEnabled
4 // if an acc is not include, it will be not enabled independent of the compiler flags
14 #include "alpaka/acc/Tag.hpp"
16 #include "alpaka/meta/Filter.hpp"
17 
18 #include <type_traits>
19 
20 namespace alpaka
21 {
22  //! \brief check if the accelerator is enabled for a given tag
23  //! \tparam TTag alpaka tag type
24  template<concepts::Tag TTag, typename = void>
25  struct AccIsEnabled : std::false_type
26  {
27  };
28 
29  template<concepts::Tag TTag>
30  struct AccIsEnabled<TTag, std::void_t<TagToAcc<TTag, alpaka::DimInt<1>, int>>> : std::true_type
31  {
32  };
33 
34  //! list of all tags where the related accelerator is enabled
36 
37 } // 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
check if the accelerator is enabled for a given tag