CMS 3D CMS Logo

TrackingRecHitsHost.h
Go to the documentation of this file.
1 #ifndef DataFormats_TrackingRecHitSoA_interface_TrackingRecHitsHost_h
2 #define DataFormats_TrackingRecHitSoA_interface_TrackingRecHitsHost_h
3 
4 #include <cstdint>
5 
6 #include <alpaka/alpaka.hpp>
7 
11 
12 template <typename TrackerTraits>
13 class TrackingRecHitHost : public PortableHostCollection<TrackingRecHitLayout<TrackerTraits>> {
14 public:
16  //Need to decorate the class with the inherited portable accessors being now a template
20 
21  TrackingRecHitHost() = default;
22 
23  template <typename TQueue>
24  explicit TrackingRecHitHost(uint32_t nHits, TQueue queue)
26 
27  // Constructor which specifies the SoA size
28  template <typename TQueue>
29  explicit TrackingRecHitHost(uint32_t nHits, int32_t offsetBPIX2, uint32_t const* hitsModuleStart, TQueue queue)
32  view().offsetBPIX2() = offsetBPIX2;
33  }
34 
35  uint32_t nHits() const { return view().metadata().size(); }
36  uint32_t const* hitsModuleStart() const { return view().hitsModuleStart().data(); }
37 };
38 
42 
43 #endif // DataFormats_TrackingRecHitSoA_interface_TrackingRecHitsHost_h
uint32_t nHits() const
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<> TrackingRecHitLayout
constexpr uint16_t numberOfModules
TrackingRecHitHost(uint32_t nHits, TQueue queue)
TrackingRecHitHost()=default
uint32_t const * hitsModuleStart() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
TrackingRecHitHost(uint32_t nHits, int32_t offsetBPIX2, uint32_t const *hitsModuleStart, TQueue queue)