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
9
#include "
alpaka/acc/AccCpuOmp2Blocks.hpp
"
10
#include "
alpaka/acc/AccCpuOmp2Threads.hpp
"
11
#include "
alpaka/acc/AccCpuSerial.hpp
"
12
#include "
alpaka/acc/AccCpuSycl.hpp
"
13
#include "
alpaka/acc/AccCpuTbbBlocks.hpp
"
14
#include "
alpaka/acc/AccCpuThreads.hpp
"
15
#include "
alpaka/acc/AccFpgaSyclIntel.hpp
"
16
#include "
alpaka/acc/AccGpuCudaRt.hpp
"
17
#include "
alpaka/acc/AccGpuHipRt.hpp
"
18
#include "
alpaka/acc/Tag.hpp
"
19
#include "
alpaka/dim/DimIntegralConst.hpp
"
20
#include "
alpaka/meta/Filter.hpp
"
21
22
#include <type_traits>
23
24
namespace
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
39
using
EnabledAccTags
=
alpaka::meta::Filter<AccTags, alpaka::AccIsEnabled>
;
40
41
namespace
trait
42
{
43
44
template
<concepts::Tag TTag>
45
struct
DevType
<TTag>
46
{
47
using
type
=
typename
DevType<alpaka::TagToAcc<TTag, alpaka::DimInt<1>
,
int
>>::type;
48
};
49
50
}
// namespace trait
51
52
}
// namespace alpaka
AccCpuOmp2Blocks.hpp
AccCpuOmp2Threads.hpp
AccCpuSerial.hpp
AccCpuSycl.hpp
AccCpuTbbBlocks.hpp
AccCpuThreads.hpp
AccFpgaSyclIntel.hpp
AccGpuCudaRt.hpp
AccGpuHipRt.hpp
DimIntegralConst.hpp
Filter.hpp
Tag.hpp
alpaka::meta::Filter
typename detail::FilterImpl< TList, TPred >::type Filter
Definition
Filter.hpp:46
alpaka
The alpaka accelerator library.
Definition
AccCpuOmp2Blocks.hpp:52
alpaka::EnabledAccTags
alpaka::meta::Filter< AccTags, alpaka::AccIsEnabled > EnabledAccTags
list of all tags where the related accelerator is enabled
Definition
TagAccIsEnabled.hpp:39
std
STL namespace.
alpaka::AccIsEnabled
check if the accelerator is enabled for a given tag
Definition
TagAccIsEnabled.hpp:30
alpaka::trait::DevType< TTag >::type
typename DevType< alpaka::TagToAcc< TTag, alpaka::DimInt< 1 >, int > >::type type
Definition
TagAccIsEnabled.hpp:47
alpaka::trait::DevType
The device type trait.
Definition
Traits.hpp:23
include
alpaka
acc
TagAccIsEnabled.hpp
Generated on Mon Dec 15 2025 16:28:10 for alpaka by
1.9.8