-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- the value of AccIsEnabled indicates whether an accelerator is enabled for a specific tag - AccTags list which contains all tags - EnabledAccTags contains all tags, where the related Acc is enabled - isCpuTag returns true, if the related Acc is bounded the cpuplatform - enable relaxed template template argument matching for Clang base compiler
- Loading branch information
1 parent
35ce4a6
commit f3664a1
Showing
5 changed files
with
99 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
// include all Acc's because of the struct AccIsEnabled | ||
// if an acc is not include, it will be not enabled independent of the compiler flags | ||
#include "alpaka/acc/AccCpuOmp2Blocks.hpp" | ||
#include "alpaka/acc/AccCpuOmp2Threads.hpp" | ||
#include "alpaka/acc/AccCpuSerial.hpp" | ||
#include "alpaka/acc/AccCpuSycl.hpp" | ||
#include "alpaka/acc/AccCpuTbbBlocks.hpp" | ||
#include "alpaka/acc/AccCpuThreads.hpp" | ||
#include "alpaka/acc/AccFpgaSyclIntel.hpp" | ||
#include "alpaka/acc/AccGpuCudaRt.hpp" | ||
#include "alpaka/acc/AccGpuHipRt.hpp" | ||
#include "alpaka/dim/DimIntegralConst.hpp" | ||
#include "alpaka/meta/Filter.hpp" | ||
|
||
#include <type_traits> | ||
|
||
namespace alpaka | ||
{ | ||
//! \brief check if the accelerator is enabled for a given tag | ||
//! \tparam TTag alpaka tag type | ||
template<typename TTag, typename = void> | ||
struct AccIsEnabled : std::false_type | ||
{ | ||
}; | ||
|
||
template<typename TTag> | ||
struct AccIsEnabled<TTag, std::void_t<TagToAcc<TTag, alpaka::DimInt<1>, int>>> : std::true_type | ||
{ | ||
}; | ||
|
||
//! list of all tags where the related accelerator is enabled | ||
using EnabledAccTags = alpaka::meta::Filter<AccTags, alpaka::AccIsEnabled>; | ||
|
||
} // namespace alpaka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters