CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Static Private Attributes
TrackingRecHit2DHeterogeneous< Traits > Class Template Reference

#include <TrackingRecHit2DHeterogeneous.h>

Public Types

using PhiBinner = TrackingRecHit2DSOAView::PhiBinner
 
enum  Storage16 { Storage16::kDetId = 0, Storage16::kPhi = 1, Storage16::kXSize = 2, Storage16::kYSize = 3 }
 
enum  Storage32 {
  Storage32::kXLocal = 0, Storage32::kYLocal = 1, Storage32::kXerror = 2, Storage32::kYerror = 3,
  Storage32::kCharge = 4, Storage32::kXGlobal = 5, Storage32::kYGlobal = 6, Storage32::kZGlobal = 7,
  Storage32::kRGlobal = 8, Storage32::kPhiStorage = 9, Storage32::kLayers = 10
}
 
template<typename T >
using unique_ptr = typename Traits::template unique_ptr< T >
 

Public Member Functions

void copyFromGPU (TrackingRecHit2DHeterogeneous< cms::cudacompat::GPUTraits > const *input, cudaStream_t stream)
 
auto hitsLayerStart ()
 
auto hitsModuleStart () const
 
cms::cuda::host::unique_ptr< uint32_t[]> hitsModuleStartToHostAsync (cudaStream_t stream) const
 
auto iphi ()
 
cms::cuda::host::unique_ptr< float[]> localCoordToHostAsync (cudaStream_t stream) const
 
auto nHits () const
 
auto nMaxModules () const
 
auto offsetBPIX2 () const
 
TrackingRecHit2DHeterogeneousoperator= (const TrackingRecHit2DHeterogeneous &)=delete
 
TrackingRecHit2DHeterogeneousoperator= (TrackingRecHit2DHeterogeneous &&)=default
 
auto phiBinner ()
 
auto phiBinnerStorage ()
 
cms::cuda::host::unique_ptr< uint16_t[]> store16ToHostAsync (cudaStream_t stream) const
 
cms::cuda::host::unique_ptr< float[]> store32ToHostAsync (cudaStream_t stream) const
 
 TrackingRecHit2DHeterogeneous ()=default
 
 TrackingRecHit2DHeterogeneous (uint32_t nHits, bool isPhase2, int32_t offsetBPIX2, pixelCPEforGPU::ParamsOnGPU const *cpeParams, uint32_t const *hitsModuleStart, cudaStream_t stream, TrackingRecHit2DHeterogeneous< cms::cudacompat::GPUTraits > const *input=nullptr)
 
 TrackingRecHit2DHeterogeneous (float *store32, uint16_t *store16, uint32_t *modules, int nHits, cudaStream_t stream=nullptr)
 
 TrackingRecHit2DHeterogeneous (const TrackingRecHit2DHeterogeneous &)=delete
 
 TrackingRecHit2DHeterogeneous (TrackingRecHit2DHeterogeneous &&)=default
 
TrackingRecHit2DSOAViewview ()
 
TrackingRecHit2DSOAView const * view () const
 
 ~TrackingRecHit2DHeterogeneous ()=default
 

Private Attributes

unique_ptr< TrackingRecHit2DSOAView::AverageGeometrym_AverageGeometryStore
 
uint32_t * m_hitsLayerStart
 
uint32_t const * m_hitsModuleStart
 
int16_t * m_iphi
 
uint32_t m_nHits
 
uint32_t m_nMaxModules
 
int32_t m_offsetBPIX2
 
PhiBinnerm_phiBinner
 
PhiBinner::index_typem_phiBinnerStorage
 
unique_ptr< TrackingRecHit2DSOAView::PhiBinnerm_PhiBinnerStore
 
unique_ptr< uint16_t[]> m_store16
 
unique_ptr< float[]> m_store32
 
unique_ptr< TrackingRecHit2DSOAViewm_view
 

Static Private Attributes

static constexpr uint32_t n16 = 4
 
static constexpr uint32_t n32 = 10
 

Detailed Description

template<typename Traits>
class TrackingRecHit2DHeterogeneous< Traits >

Definition at line 9 of file TrackingRecHit2DHeterogeneous.h.

Member Typedef Documentation

◆ PhiBinner

template<typename Traits>
using TrackingRecHit2DHeterogeneous< Traits >::PhiBinner = TrackingRecHit2DSOAView::PhiBinner

Definition at line 35 of file TrackingRecHit2DHeterogeneous.h.

◆ unique_ptr

template<typename Traits>
template<typename T >
using TrackingRecHit2DHeterogeneous< Traits >::unique_ptr = typename Traits::template unique_ptr<T>

Definition at line 33 of file TrackingRecHit2DHeterogeneous.h.

Member Enumeration Documentation

◆ Storage16

template<typename Traits>
enum TrackingRecHit2DHeterogeneous::Storage16
strong
Enumerator
kDetId 
kPhi 
kXSize 
kYSize 

Definition at line 25 of file TrackingRecHit2DHeterogeneous.h.

25  {
26  kDetId = 0,
27  kPhi = 1,
28  kXSize = 2,
29  kYSize = 3,
30  };

◆ Storage32

template<typename Traits>
enum TrackingRecHit2DHeterogeneous::Storage32
strong
Enumerator
kXLocal 
kYLocal 
kXerror 
kYerror 
kCharge 
kXGlobal 
kYGlobal 
kZGlobal 
kRGlobal 
kPhiStorage 
kLayers 

Definition at line 11 of file TrackingRecHit2DHeterogeneous.h.

11  {
12  kXLocal = 0,
13  kYLocal = 1,
14  kXerror = 2,
15  kYerror = 3,
16  kCharge = 4,
17  kXGlobal = 5,
18  kYGlobal = 6,
19  kZGlobal = 7,
20  kRGlobal = 8,
21  kPhiStorage = 9,
22  kLayers = 10
23  };

Constructor & Destructor Documentation

◆ TrackingRecHit2DHeterogeneous() [1/5]

template<typename Traits>
TrackingRecHit2DHeterogeneous< Traits >::TrackingRecHit2DHeterogeneous ( )
default

◆ TrackingRecHit2DHeterogeneous() [2/5]

template<typename Traits >
TrackingRecHit2DHeterogeneous< Traits >::TrackingRecHit2DHeterogeneous ( uint32_t  nHits,
bool  isPhase2,
int32_t  offsetBPIX2,
pixelCPEforGPU::ParamsOnGPU const *  cpeParams,
uint32_t const *  hitsModuleStart,
cudaStream_t  stream,
TrackingRecHit2DHeterogeneous< cms::cudacompat::GPUTraits > const *  input = nullptr 
)
explicit

Definition at line 114 of file TrackingRecHit2DHeterogeneous.h.

References cms::cuda::assert(), cms::cuda::copyAsync(), TrackingRecHit2DHeterogeneous< Traits >::copyFromGPU(), TrackingRecHit2DHeterogeneous< Traits >::hitsModuleStart(), mps_fire::i, input, HLT_2022v12_cff::isPhase2, TrackingRecHit2DHeterogeneous< Traits >::kCharge, TrackingRecHit2DHeterogeneous< Traits >::kDetId, TrackingRecHit2DHeterogeneous< Traits >::kLayers, TrackingRecHit2DHeterogeneous< Traits >::kPhi, TrackingRecHit2DHeterogeneous< Traits >::kPhiStorage, TrackingRecHit2DHeterogeneous< Traits >::kRGlobal, TrackingRecHit2DHeterogeneous< Traits >::kXerror, TrackingRecHit2DHeterogeneous< Traits >::kXGlobal, TrackingRecHit2DHeterogeneous< Traits >::kXLocal, TrackingRecHit2DHeterogeneous< Traits >::kXSize, TrackingRecHit2DHeterogeneous< Traits >::kYerror, TrackingRecHit2DHeterogeneous< Traits >::kYGlobal, TrackingRecHit2DHeterogeneous< Traits >::kYLocal, TrackingRecHit2DHeterogeneous< Traits >::kYSize, TrackingRecHit2DHeterogeneous< Traits >::kZGlobal, TrackingRecHit2DSOAView::m_averageGeometry, TrackingRecHit2DHeterogeneous< Traits >::m_AverageGeometryStore, TrackingRecHit2DSOAView::m_chargeAndStatus, TrackingRecHit2DSOAView::m_cpeParams, TrackingRecHit2DSOAView::m_detInd, TrackingRecHit2DHeterogeneous< Traits >::m_hitsLayerStart, TrackingRecHit2DSOAView::m_hitsLayerStart, TrackingRecHit2DSOAView::m_hitsModuleStart, TrackingRecHit2DSOAView::m_iphi, TrackingRecHit2DHeterogeneous< Traits >::m_iphi, TrackingRecHit2DSOAView::m_nHits, TrackingRecHit2DHeterogeneous< Traits >::m_nMaxModules, TrackingRecHit2DSOAView::m_nMaxModules, TrackingRecHit2DHeterogeneous< Traits >::m_phiBinner, TrackingRecHit2DSOAView::m_phiBinner, TrackingRecHit2DHeterogeneous< Traits >::m_phiBinnerStorage, TrackingRecHit2DSOAView::m_phiBinnerStorage, TrackingRecHit2DHeterogeneous< Traits >::m_PhiBinnerStore, TrackingRecHit2DSOAView::m_rg, TrackingRecHit2DHeterogeneous< Traits >::m_store16, TrackingRecHit2DHeterogeneous< Traits >::m_store32, TrackingRecHit2DHeterogeneous< Traits >::m_view, TrackingRecHit2DSOAView::m_xerr, TrackingRecHit2DSOAView::m_xg, TrackingRecHit2DSOAView::m_xl, TrackingRecHit2DSOAView::m_xsize, TrackingRecHit2DSOAView::m_yerr, TrackingRecHit2DSOAView::m_yg, TrackingRecHit2DSOAView::m_yl, TrackingRecHit2DSOAView::m_ysize, TrackingRecHit2DSOAView::m_zg, TrackingRecHit2DHeterogeneous< Traits >::n16, TrackingRecHit2DHeterogeneous< Traits >::n32, TrackingRecHit2DHeterogeneous< Traits >::nHits(), phase1PixelTopology::numberOfLayers, phase2PixelTopology::numberOfLayers, phase1PixelTopology::numberOfModules, phase2PixelTopology::numberOfModules, cms::cuda::stream, svgfig::template(), and TrackingRecHit2DHeterogeneous< Traits >::view().

123  auto view = Traits::template make_host_unique<TrackingRecHit2DSOAView>(stream);
124 
126 
127  view->m_nHits = nHits;
129  m_view = Traits::template make_unique<TrackingRecHit2DSOAView>(stream); // leave it on host and pass it by value?
130  m_AverageGeometryStore = Traits::template make_unique<TrackingRecHit2DSOAView::AverageGeometry>(stream);
132  view->m_cpeParams = cpeParams;
134 
135  // if empy do not bother
136  if (0 == nHits) {
137  if constexpr (std::is_same_v<Traits, cms::cudacompat::GPUTraits>) {
139  } else {
140  m_view.reset(view.release()); // NOLINT: std::move() breaks CUDA version
141  }
142  return;
143  }
144 
145  // the single arrays are not 128 bit alligned...
146  // the hits are actually accessed in order only in building
147  // if ordering is relevant they may have to be stored phi-ordered by layer or so
148  // this will break 1to1 correspondence with cluster and module locality
149  // so unless proven VERY inefficient we keep it ordered as generated
150 
151  // host copy is "reduced" (to be reviewed at some point)
152  if constexpr (std::is_same_v<Traits, cms::cudacompat::HostTraits>) {
153  // it has to compile for ALL cases
155  } else {
156  assert(input == nullptr);
157 
159 
160  m_store16 = Traits::template make_unique<uint16_t[]>(nHits * n16, stream);
161  m_store32 = Traits::template make_unique<float[]>(nHits * n32 + nL + 1, stream);
162  m_PhiBinnerStore = Traits::template make_unique<TrackingRecHit2DSOAView::PhiBinner>(stream);
163  }
164 
165  static_assert(sizeof(TrackingRecHit2DSOAView::hindex_type) == sizeof(float));
167 
168  auto get32 = [&](Storage32 i) { return m_store32.get() + static_cast<int>(i) * nHits; };
169 
170  // copy all the pointers
174 
175  view->m_xl = get32(Storage32::kXLocal);
176  view->m_yl = get32(Storage32::kYLocal);
177  view->m_xerr = get32(Storage32::kXerror);
178  view->m_yerr = get32(Storage32::kYerror);
179  view->m_chargeAndStatus = reinterpret_cast<uint32_t*>(get32(Storage32::kCharge));
180 
181  if constexpr (!std::is_same_v<Traits, cms::cudacompat::HostTraits>) {
182  assert(input == nullptr);
183  view->m_xg = get32(Storage32::kXGlobal);
184  view->m_yg = get32(Storage32::kYGlobal);
185  view->m_zg = get32(Storage32::kZGlobal);
186  view->m_rg = get32(Storage32::kRGlobal);
187 
188  auto get16 = [&](Storage16 i) { return m_store16.get() + static_cast<int>(i) * nHits; };
189  m_iphi = view->m_iphi = reinterpret_cast<int16_t*>(get16(Storage16::kPhi));
190 
191  view->m_xsize = reinterpret_cast<int16_t*>(get16(Storage16::kXSize));
192  view->m_ysize = reinterpret_cast<int16_t*>(get16(Storage16::kYSize));
193  view->m_detInd = get16(Storage16::kDetId);
194 
196  m_hitsLayerStart = view->m_hitsLayerStart = reinterpret_cast<uint32_t*>(get32(Storage32::kLayers));
197  }
198 
199  // transfer view
200  if constexpr (std::is_same_v<Traits, cms::cudacompat::GPUTraits>) {
202  } else {
203  m_view.reset(view.release()); // NOLINT: std::move() breaks CUDA version
204  }
205 }
constexpr uint32_t numberOfLayers
void copyFromGPU(TrackingRecHit2DHeterogeneous< cms::cudacompat::GPUTraits > const *input, cudaStream_t stream)
unique_ptr< TrackingRecHit2DSOAView > m_view
constexpr uint32_t numberOfModules
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
assert(be >=bs)
static std::string const input
Definition: EdmProvDump.cc:47
typename Base::index_type index_type
unique_ptr< TrackingRecHit2DSOAView::AverageGeometry > m_AverageGeometryStore
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
PhiBinner::index_type * m_phiBinnerStorage
constexpr uint32_t numberOfModules
constexpr uint8_t numberOfLayers
pixelCPEforGPU::ParamsOnGPU const * m_cpeParams
unique_ptr< TrackingRecHit2DSOAView::PhiBinner > m_PhiBinnerStore

◆ TrackingRecHit2DHeterogeneous() [3/5]

template<typename Traits >
TrackingRecHit2DHeterogeneous< Traits >::TrackingRecHit2DHeterogeneous ( float *  store32,
uint16_t *  store16,
uint32_t *  modules,
int  nHits,
cudaStream_t  stream = nullptr 
)
explicit

Definition at line 209 of file TrackingRecHit2DHeterogeneous.h.

References filterCSVwithJSON::copy, cms::cuda::copyAsync(), mps_fire::i, TrackingRecHit2DHeterogeneous< Traits >::kCharge, TrackingRecHit2DHeterogeneous< Traits >::kDetId, TrackingRecHit2DHeterogeneous< Traits >::kPhi, TrackingRecHit2DHeterogeneous< Traits >::kPhiStorage, TrackingRecHit2DHeterogeneous< Traits >::kRGlobal, TrackingRecHit2DHeterogeneous< Traits >::kXerror, TrackingRecHit2DHeterogeneous< Traits >::kXGlobal, TrackingRecHit2DHeterogeneous< Traits >::kXLocal, TrackingRecHit2DHeterogeneous< Traits >::kXSize, TrackingRecHit2DHeterogeneous< Traits >::kYerror, TrackingRecHit2DHeterogeneous< Traits >::kYGlobal, TrackingRecHit2DHeterogeneous< Traits >::kYLocal, TrackingRecHit2DHeterogeneous< Traits >::kYSize, TrackingRecHit2DHeterogeneous< Traits >::kZGlobal, TrackingRecHit2DSOAView::m_averageGeometry, TrackingRecHit2DHeterogeneous< Traits >::m_AverageGeometryStore, TrackingRecHit2DSOAView::m_chargeAndStatus, TrackingRecHit2DSOAView::m_detInd, TrackingRecHit2DHeterogeneous< Traits >::m_hitsModuleStart, TrackingRecHit2DSOAView::m_hitsModuleStart, TrackingRecHit2DSOAView::m_iphi, TrackingRecHit2DHeterogeneous< Traits >::m_iphi, TrackingRecHit2DSOAView::m_nHits, TrackingRecHit2DHeterogeneous< Traits >::m_phiBinner, TrackingRecHit2DSOAView::m_phiBinner, TrackingRecHit2DHeterogeneous< Traits >::m_phiBinnerStorage, TrackingRecHit2DSOAView::m_phiBinnerStorage, TrackingRecHit2DHeterogeneous< Traits >::m_PhiBinnerStore, TrackingRecHit2DSOAView::m_rg, TrackingRecHit2DHeterogeneous< Traits >::m_store16, TrackingRecHit2DHeterogeneous< Traits >::m_store32, TrackingRecHit2DHeterogeneous< Traits >::m_view, TrackingRecHit2DSOAView::m_xerr, TrackingRecHit2DSOAView::m_xg, TrackingRecHit2DSOAView::m_xl, TrackingRecHit2DSOAView::m_xsize, TrackingRecHit2DSOAView::m_yerr, TrackingRecHit2DSOAView::m_yg, TrackingRecHit2DSOAView::m_yl, TrackingRecHit2DSOAView::m_ysize, TrackingRecHit2DSOAView::m_zg, eostools::move(), TrackingRecHit2DHeterogeneous< Traits >::n16, TrackingRecHit2DHeterogeneous< Traits >::n32, TrackingRecHit2DHeterogeneous< Traits >::nHits(), cms::cuda::stream, svgfig::template(), and TrackingRecHit2DHeterogeneous< Traits >::view().

212  auto view = Traits::template make_host_unique<TrackingRecHit2DSOAView>(stream);
213 
214  m_view = Traits::template make_unique<TrackingRecHit2DSOAView>(stream);
215 
216  view->m_nHits = nHits;
217 
218  if (0 == nHits) {
219  if constexpr (std::is_same_v<Traits, cms::cudacompat::GPUTraits>) {
221  } else {
222  m_view = std::move(view);
223  }
224  return;
225  }
226 
227  m_store16 = Traits::template make_unique<uint16_t[]>(nHits * n16, stream);
228  m_store32 = Traits::template make_unique<float[]>(nHits * n32, stream);
229  m_PhiBinnerStore = Traits::template make_unique<TrackingRecHit2DSOAView::PhiBinner>(stream);
230  m_AverageGeometryStore = Traits::template make_unique<TrackingRecHit2DSOAView::AverageGeometry>(stream);
231 
234 
235  //store transfer
236  if constexpr (std::is_same_v<Traits, cms::cudacompat::GPUTraits>) {
239  } else {
240  std::copy(store32, store32 + nHits * n32, m_store32.get()); // want to copy it
241  std::copy(store16, store16 + nHits * n16, m_store16.get());
242  }
243 
244  //getters
245  auto get32 = [&](Storage32 i) { return m_store32.get() + static_cast<int>(i) * nHits; };
246  auto get16 = [&](Storage16 i) { return m_store16.get() + static_cast<int>(i) * nHits; };
247 
248  //Store 32
249  view->m_xl = get32(Storage32::kXLocal);
250  view->m_yl = get32(Storage32::kYLocal);
251  view->m_xerr = get32(Storage32::kXerror);
252  view->m_yerr = get32(Storage32::kYerror);
253  view->m_chargeAndStatus = reinterpret_cast<uint32_t*>(get32(Storage32::kCharge));
254  view->m_xg = get32(Storage32::kXGlobal);
255  view->m_yg = get32(Storage32::kYGlobal);
256  view->m_zg = get32(Storage32::kZGlobal);
257  view->m_rg = get32(Storage32::kRGlobal);
258 
262 
263  //Store 16
264  view->m_detInd = get16(Storage16::kDetId);
265  m_iphi = view->m_iphi = reinterpret_cast<int16_t*>(get16(Storage16::kPhi));
266  view->m_xsize = reinterpret_cast<int16_t*>(get16(Storage16::kXSize));
267  view->m_ysize = reinterpret_cast<int16_t*>(get16(Storage16::kYSize));
268 
269  // transfer view
270  if constexpr (std::is_same_v<Traits, cms::cudacompat::GPUTraits>) {
272  } else {
273  m_view = std::move(view);
274  }
275 }
unique_ptr< TrackingRecHit2DSOAView > m_view
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
typename Base::index_type index_type
unique_ptr< TrackingRecHit2DSOAView::AverageGeometry > m_AverageGeometryStore
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
PhiBinner::index_type * m_phiBinnerStorage
def move(src, dest)
Definition: eostools.py:511
unique_ptr< TrackingRecHit2DSOAView::PhiBinner > m_PhiBinnerStore

◆ ~TrackingRecHit2DHeterogeneous()

template<typename Traits>
TrackingRecHit2DHeterogeneous< Traits >::~TrackingRecHit2DHeterogeneous ( )
default

◆ TrackingRecHit2DHeterogeneous() [4/5]

template<typename Traits>
TrackingRecHit2DHeterogeneous< Traits >::TrackingRecHit2DHeterogeneous ( const TrackingRecHit2DHeterogeneous< Traits > &  )
delete

◆ TrackingRecHit2DHeterogeneous() [5/5]

template<typename Traits>
TrackingRecHit2DHeterogeneous< Traits >::TrackingRecHit2DHeterogeneous ( TrackingRecHit2DHeterogeneous< Traits > &&  )
default

Member Function Documentation

◆ copyFromGPU()

template<typename Traits>
void TrackingRecHit2DHeterogeneous< Traits >::copyFromGPU ( TrackingRecHit2DHeterogeneous< cms::cudacompat::GPUTraits > const *  input,
cudaStream_t  stream 
)

◆ hitsLayerStart()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::hitsLayerStart ( )
inline

◆ hitsModuleStart()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::hitsModuleStart ( ) const
inline

◆ hitsModuleStartToHostAsync()

cms::cuda::host::unique_ptr< uint32_t[]> TrackingRecHit2DGPU::hitsModuleStartToHostAsync ( cudaStream_t  stream) const

Definition at line 29 of file TrackingRecHit2DHeterogeneous.cc.

References cudaCheck, TrackingRecHit2DHeterogeneous< Traits >::m_hitsModuleStart, TrackingRecHit2DHeterogeneous< Traits >::nMaxModules(), runTheMatrix::ret, and cms::cuda::stream.

29  {
30  auto ret = cms::cuda::make_host_unique<uint32_t[]>(nMaxModules() + 1, stream);
31  cudaCheck(
32  cudaMemcpyAsync(ret.get(), m_hitsModuleStart, sizeof(uint32_t) * (nMaxModules() + 1), cudaMemcpyDefault, stream));
33  return ret;
34 }
ret
prodAgent to be discontinued
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69

◆ iphi()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::iphi ( )
inline

◆ localCoordToHostAsync()

cms::cuda::host::unique_ptr< float[]> TrackingRecHit2DGPU::localCoordToHostAsync ( cudaStream_t  stream) const

Definition at line 8 of file TrackingRecHit2DHeterogeneous.cc.

References cms::cuda::copyAsync(), TrackingRecHit2DHeterogeneous< Traits >::m_store32, TrackingRecHit2DHeterogeneous< Traits >::nHits(), runTheMatrix::ret, and cms::cuda::stream.

8  {
9  auto ret = cms::cuda::make_host_unique<float[]>(5 * nHits(), stream);
11  return ret;
12 }
ret
prodAgent to be discontinued
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20

◆ nHits()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::nHits ( ) const
inline

◆ nMaxModules()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::nMaxModules ( ) const
inline

◆ offsetBPIX2()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::offsetBPIX2 ( ) const
inline

◆ operator=() [1/2]

template<typename Traits>
TrackingRecHit2DHeterogeneous& TrackingRecHit2DHeterogeneous< Traits >::operator= ( const TrackingRecHit2DHeterogeneous< Traits > &  )
delete

◆ operator=() [2/2]

template<typename Traits>
TrackingRecHit2DHeterogeneous& TrackingRecHit2DHeterogeneous< Traits >::operator= ( TrackingRecHit2DHeterogeneous< Traits > &&  )
default

◆ phiBinner()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::phiBinner ( )
inline

◆ phiBinnerStorage()

template<typename Traits>
auto TrackingRecHit2DHeterogeneous< Traits >::phiBinnerStorage ( )
inline

◆ store16ToHostAsync()

cms::cuda::host::unique_ptr< uint16_t[]> TrackingRecHit2DGPU::store16ToHostAsync ( cudaStream_t  stream) const

Definition at line 22 of file TrackingRecHit2DHeterogeneous.cc.

References cms::cuda::copyAsync(), TrackingRecHit2DHeterogeneous< Traits >::m_store16, TrackingRecHit2DHeterogeneous< Traits >::n16, TrackingRecHit2DHeterogeneous< Traits >::nHits(), runTheMatrix::ret, and cms::cuda::stream.

22  {
23  auto ret = cms::cuda::make_host_unique<uint16_t[]>(static_cast<int>(n16) * nHits(), stream);
24  cms::cuda::copyAsync(ret, m_store16, static_cast<int>(n16) * nHits(), stream);
25  return ret;
26 }
ret
prodAgent to be discontinued
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20

◆ store32ToHostAsync()

cms::cuda::host::unique_ptr< float[]> TrackingRecHit2DGPU::store32ToHostAsync ( cudaStream_t  stream) const

Definition at line 15 of file TrackingRecHit2DHeterogeneous.cc.

References cms::cuda::copyAsync(), TrackingRecHit2DHeterogeneous< Traits >::m_store32, TrackingRecHit2DHeterogeneous< Traits >::n32, TrackingRecHit2DHeterogeneous< Traits >::nHits(), runTheMatrix::ret, and cms::cuda::stream.

15  {
16  auto ret = cms::cuda::make_host_unique<float[]>(static_cast<int>(n32) * nHits(), stream);
17  cms::cuda::copyAsync(ret, m_store32, static_cast<int>(n32) * nHits(), stream);
18  return ret;
19 }
ret
prodAgent to be discontinued
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20

◆ view() [1/2]

template<typename Traits>
TrackingRecHit2DSOAView* TrackingRecHit2DHeterogeneous< Traits >::view ( )
inline

◆ view() [2/2]

template<typename Traits>
TrackingRecHit2DSOAView const* TrackingRecHit2DHeterogeneous< Traits >::view ( ) const
inline

Definition at line 58 of file TrackingRecHit2DHeterogeneous.h.

References TrackingRecHit2DHeterogeneous< Traits >::m_view.

58 { return m_view.get(); }
unique_ptr< TrackingRecHit2DSOAView > m_view

Member Data Documentation

◆ m_AverageGeometryStore

template<typename Traits>
unique_ptr<TrackingRecHit2DSOAView::AverageGeometry> TrackingRecHit2DHeterogeneous< Traits >::m_AverageGeometryStore
private

◆ m_hitsLayerStart

template<typename Traits>
uint32_t* TrackingRecHit2DHeterogeneous< Traits >::m_hitsLayerStart
private

◆ m_hitsModuleStart

template<typename Traits>
uint32_t const* TrackingRecHit2DHeterogeneous< Traits >::m_hitsModuleStart
private

◆ m_iphi

template<typename Traits>
int16_t* TrackingRecHit2DHeterogeneous< Traits >::m_iphi
private

◆ m_nHits

template<typename Traits>
uint32_t TrackingRecHit2DHeterogeneous< Traits >::m_nHits
private

◆ m_nMaxModules

template<typename Traits>
uint32_t TrackingRecHit2DHeterogeneous< Traits >::m_nMaxModules
private

◆ m_offsetBPIX2

template<typename Traits>
int32_t TrackingRecHit2DHeterogeneous< Traits >::m_offsetBPIX2
private

◆ m_phiBinner

template<typename Traits>
PhiBinner* TrackingRecHit2DHeterogeneous< Traits >::m_phiBinner
private

◆ m_phiBinnerStorage

template<typename Traits>
PhiBinner::index_type* TrackingRecHit2DHeterogeneous< Traits >::m_phiBinnerStorage
private

◆ m_PhiBinnerStore

template<typename Traits>
unique_ptr<TrackingRecHit2DSOAView::PhiBinner> TrackingRecHit2DHeterogeneous< Traits >::m_PhiBinnerStore
private

◆ m_store16

template<typename Traits>
unique_ptr<uint16_t[]> TrackingRecHit2DHeterogeneous< Traits >::m_store16
private

◆ m_store32

template<typename Traits>
unique_ptr<float[]> TrackingRecHit2DHeterogeneous< Traits >::m_store32
private

◆ m_view

template<typename Traits>
unique_ptr<TrackingRecHit2DSOAView> TrackingRecHit2DHeterogeneous< Traits >::m_view
private

◆ n16

template<typename Traits>
constexpr uint32_t TrackingRecHit2DHeterogeneous< Traits >::n16 = 4
staticprivate

◆ n32

template<typename Traits>
constexpr uint32_t TrackingRecHit2DHeterogeneous< Traits >::n32 = 10
staticprivate