Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:00

0001 #ifndef DataFormats_Portable_interface_alpaka_PortableCollection_h
0002 #define DataFormats_Portable_interface_alpaka_PortableCollection_h
0003 
0004 #include <alpaka/alpaka.hpp>
0005 
0006 #include "DataFormats/Portable/interface/PortableCollection.h"
0007 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0008 
0009 // This header is not used by PortableCollection, but is included here to automatically
0010 // provide its content to users of ALPAKA_ACCELERATOR_NAMESPACE::PortableCollection.
0011 #include "HeterogeneousCore/AlpakaInterface/interface/AssertDeviceMatchesHostCollection.h"
0012 
0013 namespace ALPAKA_ACCELERATOR_NAMESPACE {
0014 
0015   // generic SoA-based product in the device (that may be host) memory
0016   template <typename T>
0017   using PortableCollection = ::PortableCollection<T, Device>;
0018 
0019   // Singleton case does not need to be aliased. A special template covers it.
0020   //
0021   // This aliasing is needed to work with ROOT serialization. Bare templates make dictionary compilation fail.
0022   template <typename T0, typename T1>
0023   using PortableCollection2 = ::PortableMultiCollection<Device, T0, T1>;
0024 
0025   template <typename T0, typename T1, typename T2>
0026   using PortableCollection3 = ::PortableMultiCollection<Device, T0, T1, T2>;
0027 
0028   template <typename T0, typename T1, typename T2, typename T3>
0029   using PortableCollection4 = ::PortableMultiCollection<Device, T0, T1, T2, T3>;
0030 
0031   template <typename T0, typename T1, typename T2, typename T3, typename T4>
0032   using PortableCollection5 = ::PortableMultiCollection<Device, T0, T1, T2, T3, T4>;
0033 
0034 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE
0035 
0036 #endif  // DataFormats_Portable_interface_alpaka_PortableCollection_h