CMS 3D CMS Logo

gpuPixelDoublets.h
Go to the documentation of this file.
1 #ifndef RecoPixelVertexing_PixelTriplets_plugins_gpuPixelDoublets_h
2 #define RecoPixelVertexing_PixelTriplets_plugins_gpuPixelDoublets_h
3 
5 
6 #define CONSTANT_VAR __constant__
7 
8 namespace gpuPixelDoublets {
9 
10  template <typename TrackerTraits>
11  __global__ void initDoublets(OuterHitOfCell<TrackerTraits> isOuterHitOfCell,
12  int nHits,
17  assert(isOuterHitOfCell.container);
18  int first = blockIdx.x * blockDim.x + threadIdx.x;
19  for (int i = first; i < nHits - isOuterHitOfCell.offset; i += gridDim.x * blockDim.x)
20  isOuterHitOfCell.container[i].reset();
21 
22  if (0 == first) {
23  cellNeighbors->construct(TrackerTraits::maxNumOfActiveDoublets, cellNeighborsContainer);
24  cellTracks->construct(TrackerTraits::maxNumOfActiveDoublets, cellTracksContainer);
25  auto i = cellNeighbors->extend();
26  assert(0 == i);
27  (*cellNeighbors)[0].reset();
28  i = cellTracks->extend();
29  assert(0 == i);
30  (*cellTracks)[0].reset();
31  }
32  }
33 
34  constexpr auto getDoubletsFromHistoMaxBlockSize = 64; // for both x and y
36 
37  template <typename TrackerTraits>
39 #ifdef __CUDACC__
41 #endif
42  void getDoubletsFromHisto(GPUCACellT<TrackerTraits>* cells,
43  uint32_t* nCells,
48  int nActualPairs,
50 
51  doubletsFromHisto<TrackerTraits>(
53  }
54 
55 } // namespace gpuPixelDoublets
56 
57 #endif // RecoPixelVertexing_PixelTriplets_plugins_gpuPixelDoublets_h
const dim3 threadIdx
Definition: cudaCompat.h:29
int CellNeighborsVector< TrackerTraits > * cellNeighbors
const dim3 gridDim
Definition: cudaCompat.h:33
#define __global__
Definition: cudaCompat.h:19
const dim3 blockDim
Definition: cudaCompat.h:30
int CellNeighborsVector< TrackerTraits > CellNeighbors< TrackerTraits > * cellNeighborsContainer
uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > hh
GPUCACellT< TrackerTraits > * cells
Definition: gpuFishbone.h:34
int CellNeighborsVector< TrackerTraits > CellNeighbors< TrackerTraits > CellTracksVector< TrackerTraits > * cellTracks
uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > OuterHitOfCell< TrackerTraits > int nActualPairs
const dim3 blockIdx
Definition: cudaCompat.h:32
constexpr auto getDoubletsFromHistoMinBlocksPerMP
GPUCACellT< TrackerTraits > uint32_t const *__restrict__ nCells
Definition: gpuFishbone.h:34
auto const isOuterHitOfCell
Definition: gpuFishbone.h:41
int CellNeighborsVector< TrackerTraits > CellNeighbors< TrackerTraits > CellTracksVector< TrackerTraits > CellTracks< TrackerTraits > * cellTracksContainer
constexpr auto getDoubletsFromHistoMaxBlockSize
uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > OuterHitOfCell< TrackerTraits > int CellCutsT< TrackerTraits > cuts
typename GPUCACellT< TrackerTraits >::HitsConstView HitsConstView
Definition: gpuFishbone.h:30
GPUCACellT< TrackerTraits > uint32_t const *__restrict__ OuterHitOfCell< TrackerTraits > const int32_t nHits
Definition: gpuFishbone.h:34