Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-08 03:36:18

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   // host backends can use TProduct directly
0011   // all device backends need to be wrapped
0012   inline constexpr bool useESProductDirectly = std::is_same_v<Platform, alpaka::PlatformCpu>;
0013 
0014   /**
0015    * Type alias for the actual product type put in an
0016    * EventSetup record
0017    */
0018   template <typename TProduct>
0019   using ESDeviceProductType = std::conditional_t<useESProductDirectly, TProduct, ESDeviceProduct<TProduct>>;
0020 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE::detail
0021 
0022 #endif