File indexing completed on 2024-04-06 12:15:39
0001 #ifndef HeterogeneousCore_AlpakaCore_interface_alpaka_ESDeviceProductType_h
0002 #define HeterogeneousCore_AlpakaCore_interface_alpaka_ESDeviceProductType_h
0003
0004 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESDeviceProduct.h"
0005 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0006
0007 #include <type_traits>
0008
0009 namespace ALPAKA_ACCELERATOR_NAMESPACE::detail {
0010
0011
0012
0013
0014 template <typename TProduct>
0015 struct ESDeviceProductType {
0016 using type = std::conditional_t<std::is_same_v<Platform, alpaka::PlatformCpu>,
0017
0018 TProduct,
0019
0020 ESDeviceProduct<TProduct>>;
0021 };
0022
0023 template <typename TProduct>
0024 inline constexpr bool useESProductDirectly = std::is_same_v<typename ESDeviceProductType<TProduct>::type, TProduct>;
0025 }
0026
0027 #endif