CMS 3D CMS Logo

PixelCPEFastParamsCollection.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiPixelRecHits_interface_alpaka_PixelCPEFastParamsCollection_h
2 #define RecoLocalTracker_SiPixelRecHits_interface_alpaka_PixelCPEFastParamsCollection_h
3 
4 #include <cstdint>
5 #include <alpaka/alpaka.hpp>
11 
12 // TODO: The class is created via inheritance of the PortableCollection.
13 // This is generally discouraged, and should be done via composition.
14 // See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
16 
17  template <typename TrackerTraits>
18  using PixelCPEFastParams = std::conditional_t<std::is_same_v<Device, alpaka::DevCpu>,
21 
25 
26 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
27 
28 namespace cms::alpakatools {
29  template <typename TrackerTraits>
30  struct CopyToDevice<PixelCPEFastParamsHost<TrackerTraits>> {
31  template <typename TQueue>
32  static auto copyAsync(TQueue& queue, PixelCPEFastParamsHost<TrackerTraits> const& srcData) {
33  using TDevice = typename alpaka::trait::DevType<TQueue>::type;
35  alpaka::memcpy(queue, dstData.buffer(), srcData.buffer());
36  return dstData;
37  }
38  };
39 } // namespace cms::alpakatools
40 
41 #endif // DataFormats_PixelCPEFastParamsoA_interface_alpaka_PixelCPEFastParamsCollection_h
static auto copyAsync(TQueue &queue, PixelCPEFastParamsHost< TrackerTraits > const &srcData)
PixelCPEFastParams< pixelTopology::HIonPhase1 > PixelCPEFastParamsHIonPhase1
PixelCPEFastParams< pixelTopology::Phase2 > PixelCPEFastParamsPhase2
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, PixelCPEFastParamsHost< TrackerTraits >, PixelCPEFastParamsDevice< Device, TrackerTraits > > PixelCPEFastParams
PixelCPEFastParams< pixelTopology::Phase1 > PixelCPEFastParamsPhase1