From 2d3eda42679ad7f6822f61b99bc2b955bf524da4 Mon Sep 17 00:00:00 2001 From: Simeon Ehrig Date: Mon, 13 May 2024 17:09:16 +0200 Subject: [PATCH] fix --- include/alpaka/alpaka.hpp | 1 - test/unit/mem/src/Visibility.cpp | 23 ++++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/include/alpaka/alpaka.hpp b/include/alpaka/alpaka.hpp index b9396429c4f9..b0458c00249e 100644 --- a/include/alpaka/alpaka.hpp +++ b/include/alpaka/alpaka.hpp @@ -172,7 +172,6 @@ #include "alpaka/meta/Integral.hpp" #include "alpaka/meta/IsArrayOrVector.hpp" #include "alpaka/meta/IsStrictBase.hpp" -#include "alpaka/meta/IsTuple.hpp" #include "alpaka/meta/NdLoop.hpp" #include "alpaka/meta/NonZero.hpp" #include "alpaka/meta/Set.hpp" diff --git a/test/unit/mem/src/Visibility.cpp b/test/unit/mem/src/Visibility.cpp index 00c5143c6bc2..3098c76aa249 100644 --- a/test/unit/mem/src/Visibility.cpp +++ b/test/unit/mem/src/Visibility.cpp @@ -12,6 +12,27 @@ using Dim = alpaka::DimInt<1>; using Idx = std::size_t; +// TODO(SimeonEhrig): Replace implementation. Instead using a list, specialize `alpaka::Platform` for +// tags to get the Memory Visiblity + +//! \brief check if the accelerator related to the tag is bounded to the cpu platform +//! \tparam TTag alpaka tag type +template +struct isCpuTag : std::false_type +{ +}; + +template +struct isCpuTag< + TTag, + std::enable_if_t< + // TAGCpuSycl is not included because it has it's own platform + std::is_same_v || std::is_same_v + || std::is_same_v || std::is_same_v + || std::is_same_v>> : std::true_type +{ +}; + template struct AccIsEnabledMemVisibilities : std::false_type { @@ -82,7 +103,7 @@ TEMPLATE_LIST_TEST_CASE("testHasSameMemView", "[mem][visibility]", EnabledTagTag // therefore all cpu accelerators can access the memory of other cpu accelerators // if the accelerator is not a cpu accelerator, both accelerators needs to be the // same to support access to the memory of each other - if constexpr((alpaka::isCpuTag::value && alpaka::isCpuTag::value) || std::is_same_v) + if constexpr((isCpuTag::value && isCpuTag::value) || std::is_same_v) { STATIC_REQUIRE(alpaka::hasSameMemView(plt1, bufDev2)); STATIC_REQUIRE(alpaka::hasSameMemView(plt2, bufDev1));