CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
CAHitNtupletGeneratorKernels< TTraits, TTTraits > Class Template Reference

#include <CAHitNtupletGeneratorKernels.h>

Public Types

using CACell = GPUCACellT< TrackerTraits >
 
using CAParams = caHitNtupletGenerator::CAParamsT< TrackerTraits >
 
using CellCuts = gpuPixelDoublets::CellCutsT< TrackerTraits >
 
using CellNeighbors = caStructures::CellNeighborsT< TrackerTraits >
 
using CellNeighborsVector = caStructures::CellNeighborsVectorT< TrackerTraits >
 
using CellTracks = caStructures::CellTracksT< TrackerTraits >
 
using CellTracksVector = caStructures::CellTracksVectorT< TrackerTraits >
 
using Counters = caHitNtupletGenerator::Counters
 
using HitContainer = typename TrackSoA< TrackerTraits >::HitContainer
 
using HitsConstView = TrackingRecHitSoAConstView< TrackerTraits >
 
using HitsView = TrackingRecHitSoAView< TrackerTraits >
 
using HitToTuple = caStructures::HitToTupleT< TrackerTraits >
 
using OuterHitOfCell = caStructures::OuterHitOfCellT< TrackerTraits >
 
using OuterHitOfCellContainer = caStructures::OuterHitOfCellContainerT< TrackerTraits >
 
using Params = caHitNtupletGenerator::ParamsT< TrackerTraits >
 
using Quality = pixelTrack::Quality
 
using QualityCuts = pixelTrack::QualityCutsT< TrackerTraits >
 
using TkSoAView = TrackSoAView< TrackerTraits >
 
using TrackerTraits = TTTraits
 
using Traits = TTraits
 
using TupleMultiplicity = caStructures::TupleMultiplicityT< TrackerTraits >
 
template<typename T >
using unique_ptr = typename Traits::template unique_ptr< T >
 

Public Member Functions

void allocateOnGPU (int32_t nHits, cudaStream_t stream)
 
void buildDoublets (const HitsConstView &hh, cudaStream_t stream)
 
 CAHitNtupletGeneratorKernels (Params const &params)
 
void classifyTuples (const HitsConstView &hh, TkSoAView &track_view, cudaStream_t cudaStream)
 
void cleanup (cudaStream_t cudaStream)
 
void launchKernels (const HitsConstView &hh, TkSoAView &track_view, cudaStream_t cudaStream)
 
void setCounters (Counters *counters)
 
TupleMultiplicity const * tupleMultiplicity () const
 
 ~CAHitNtupletGeneratorKernels ()=default
 

Static Public Member Functions

static void printCounters (Counters const *counters)
 

Protected Member Functions

uint32_t nDoubletBlocks (uint32_t blockSize)
 Compute the number of doublet blocks for block size. More...
 
uint32_t nQuadrupletBlocks (uint32_t blockSize)
 Compute the number of quadruplet blocks for block size. More...
 

Protected Attributes

unique_ptr< unsigned char[]> cellStorage_
 
Counterscounters_ = nullptr
 
unique_ptr< CellCutsdevice_cellCuts_
 
unique_ptr< HitToTupledevice_hitToTuple_
 
cms::cuda::AtomicPairCounterdevice_hitToTuple_apc_ = nullptr
 
unique_ptr< uint32_t[]> device_hitToTupleStorage_
 
cms::cuda::AtomicPairCounterdevice_hitTuple_apc_ = nullptr
 
unique_ptr< OuterHitOfCellContainer[]> device_isOuterHitOfCell_
 
uint32_t * device_nCells_ = nullptr
 
unique_ptr< cms::cuda::AtomicPairCounter::c_type[]> device_storage_
 
unique_ptr< CellNeighborsVectordevice_theCellNeighbors_
 
CellNeighborsdevice_theCellNeighborsContainer_
 
unique_ptr< CACell[]> device_theCells_
 
unique_ptr< CellTracksVectordevice_theCellTracks_
 
CellTracksdevice_theCellTracksContainer_
 
unique_ptr< TupleMultiplicitydevice_tupleMultiplicity_
 
HitToTuple::View hitToTupleView_
 
OuterHitOfCell isOuterHitOfCell_
 
Params params_
 
const uint32_t paramsMaxDoubletes3Quarters_
 Intermediate result avoiding repeated computations. More...
 

Detailed Description

template<typename TTraits, typename TTTraits>
class CAHitNtupletGeneratorKernels< TTraits, TTTraits >

Definition at line 199 of file CAHitNtupletGeneratorKernels.h.

Member Typedef Documentation

◆ CACell

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CACell = GPUCACellT<TrackerTraits>

Definition at line 225 of file CAHitNtupletGeneratorKernels.h.

◆ CAParams

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CAParams = caHitNtupletGenerator::CAParamsT<TrackerTraits>

Definition at line 205 of file CAHitNtupletGeneratorKernels.h.

◆ CellCuts

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CellCuts = gpuPixelDoublets::CellCutsT<TrackerTraits>

Definition at line 206 of file CAHitNtupletGeneratorKernels.h.

◆ CellNeighbors

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CellNeighbors = caStructures::CellNeighborsT<TrackerTraits>

Definition at line 219 of file CAHitNtupletGeneratorKernels.h.

◆ CellNeighborsVector

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CellNeighborsVector = caStructures::CellNeighborsVectorT<TrackerTraits>

Definition at line 218 of file CAHitNtupletGeneratorKernels.h.

◆ CellTracks

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CellTracks = caStructures::CellTracksT<TrackerTraits>

Definition at line 221 of file CAHitNtupletGeneratorKernels.h.

◆ CellTracksVector

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CellTracksVector = caStructures::CellTracksVectorT<TrackerTraits>

Definition at line 220 of file CAHitNtupletGeneratorKernels.h.

◆ Counters

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::Counters = caHitNtupletGenerator::Counters

Definition at line 207 of file CAHitNtupletGeneratorKernels.h.

◆ HitContainer

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::HitContainer = typename TrackSoA<TrackerTraits>::HitContainer

Definition at line 228 of file CAHitNtupletGeneratorKernels.h.

◆ HitsConstView

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::HitsConstView = TrackingRecHitSoAConstView<TrackerTraits>

Definition at line 213 of file CAHitNtupletGeneratorKernels.h.

◆ HitsView

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::HitsView = TrackingRecHitSoAView<TrackerTraits>

Definition at line 212 of file CAHitNtupletGeneratorKernels.h.

◆ HitToTuple

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::HitToTuple = caStructures::HitToTupleT<TrackerTraits>

Definition at line 216 of file CAHitNtupletGeneratorKernels.h.

◆ OuterHitOfCell

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::OuterHitOfCell = caStructures::OuterHitOfCellT<TrackerTraits>

Definition at line 223 of file CAHitNtupletGeneratorKernels.h.

◆ OuterHitOfCellContainer

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::OuterHitOfCellContainer = caStructures::OuterHitOfCellContainerT<TrackerTraits>

Definition at line 222 of file CAHitNtupletGeneratorKernels.h.

◆ Params

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::Params = caHitNtupletGenerator::ParamsT<TrackerTraits>

Definition at line 204 of file CAHitNtupletGeneratorKernels.h.

◆ Quality

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::Quality = pixelTrack::Quality

Definition at line 227 of file CAHitNtupletGeneratorKernels.h.

◆ QualityCuts

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::QualityCuts = pixelTrack::QualityCutsT<TrackerTraits>

Definition at line 203 of file CAHitNtupletGeneratorKernels.h.

◆ TkSoAView

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::TkSoAView = TrackSoAView<TrackerTraits>

Definition at line 214 of file CAHitNtupletGeneratorKernels.h.

◆ TrackerTraits

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::TrackerTraits = TTTraits

Definition at line 202 of file CAHitNtupletGeneratorKernels.h.

◆ Traits

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::Traits = TTraits

Definition at line 201 of file CAHitNtupletGeneratorKernels.h.

◆ TupleMultiplicity

template<typename TTraits, typename TTTraits>
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::TupleMultiplicity = caStructures::TupleMultiplicityT<TrackerTraits>

Definition at line 217 of file CAHitNtupletGeneratorKernels.h.

◆ unique_ptr

template<typename TTraits, typename TTTraits>
template<typename T >
using CAHitNtupletGeneratorKernels< TTraits, TTTraits >::unique_ptr = typename Traits::template unique_ptr<T>

Definition at line 210 of file CAHitNtupletGeneratorKernels.h.

Constructor & Destructor Documentation

◆ CAHitNtupletGeneratorKernels()

template<typename TTraits, typename TTTraits>
CAHitNtupletGeneratorKernels< TTraits, TTTraits >::CAHitNtupletGeneratorKernels ( Params const &  params)
inline

Definition at line 230 of file CAHitNtupletGeneratorKernels.h.

231  : params_(params), paramsMaxDoubletes3Quarters_(3 * params.caParams_.maxNumberOfDoublets_ / 4) {}
const uint32_t paramsMaxDoubletes3Quarters_
Intermediate result avoiding repeated computations.

◆ ~CAHitNtupletGeneratorKernels()

template<typename TTraits, typename TTTraits>
CAHitNtupletGeneratorKernels< TTraits, TTTraits >::~CAHitNtupletGeneratorKernels ( )
default

Member Function Documentation

◆ allocateOnGPU()

template<typename TTraits, typename TTTraits>
void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::allocateOnGPU ( int32_t  nHits,
cudaStream_t  stream 
)

◆ buildDoublets()

template<typename TTraits, typename TTTraits>
void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::buildDoublets ( const HitsConstView hh,
cudaStream_t  stream 
)

◆ classifyTuples()

template<typename TTraits, typename TTTraits>
void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::classifyTuples ( const HitsConstView hh,
TkSoAView track_view,
cudaStream_t  cudaStream 
)

◆ cleanup()

template<typename TTraits, typename TTTraits>
void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::cleanup ( cudaStream_t  cudaStream)

◆ launchKernels()

template<typename TTraits, typename TTTraits>
void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::launchKernels ( const HitsConstView hh,
TkSoAView track_view,
cudaStream_t  cudaStream 
)

◆ nDoubletBlocks()

template<typename TTraits, typename TTTraits>
uint32_t CAHitNtupletGeneratorKernels< TTraits, TTTraits >::nDoubletBlocks ( uint32_t  blockSize)
inlineprotected

Compute the number of doublet blocks for block size.

Definition at line 282 of file CAHitNtupletGeneratorKernels.h.

282  {
283  // We want (3 * params_.maxNumberOfDoublets_ / 4 + blockSize - 1) / blockSize, but first part is pre-computed.
284  return (paramsMaxDoubletes3Quarters_ + blockSize - 1) / blockSize;
285  }
const uint32_t paramsMaxDoubletes3Quarters_
Intermediate result avoiding repeated computations.

◆ nQuadrupletBlocks()

template<typename TTraits, typename TTTraits>
uint32_t CAHitNtupletGeneratorKernels< TTraits, TTTraits >::nQuadrupletBlocks ( uint32_t  blockSize)
inlineprotected

Compute the number of quadruplet blocks for block size.

Definition at line 288 of file CAHitNtupletGeneratorKernels.h.

288  {
289  // pixelTopology::maxNumberOfQuadruplets is a constexpr, so the compiler will pre compute the 3*max/4
290  return (3 * TrackerTraits::maxNumberOfQuadruplets / 4 + blockSize - 1) / blockSize;
291  }

◆ printCounters()

template<typename TTraits, typename TTTraits>
static void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::printCounters ( Counters const *  counters)
static

◆ setCounters()

template<typename TTraits, typename TTTraits>
void CAHitNtupletGeneratorKernels< TTraits, TTTraits >::setCounters ( Counters counters)
inline

Definition at line 246 of file CAHitNtupletGeneratorKernels.h.

246 { counters_ = counters; }
TupleMultiplicity< TrackerTraits > const HitToTuple< TrackerTraits > const cms::cuda::AtomicPairCounter GPUCACellT< TrackerTraits > const *__restrict__ uint32_t const *__restrict__ CellNeighborsVector< TrackerTraits > const CellTracksVector< TrackerTraits > const OuterHitOfCell< TrackerTraits > const int32_t uint32_t Counters * counters

◆ tupleMultiplicity()

template<typename TTraits, typename TTTraits>
TupleMultiplicity const* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::tupleMultiplicity ( ) const
inline

Definition at line 235 of file CAHitNtupletGeneratorKernels.h.

235 { return device_tupleMultiplicity_.get(); }
unique_ptr< TupleMultiplicity > device_tupleMultiplicity_

Member Data Documentation

◆ cellStorage_

template<typename TTraits, typename TTTraits>
unique_ptr<unsigned char[]> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::cellStorage_
protected

Definition at line 252 of file CAHitNtupletGeneratorKernels.h.

◆ counters_

template<typename TTraits, typename TTTraits>
Counters* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::counters_ = nullptr
protected

◆ device_cellCuts_

template<typename TTraits, typename TTTraits>
unique_ptr<CellCuts> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_cellCuts_
protected

Definition at line 267 of file CAHitNtupletGeneratorKernels.h.

◆ device_hitToTuple_

template<typename TTraits, typename TTTraits>
unique_ptr<HitToTuple> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_hitToTuple_
protected

Definition at line 263 of file CAHitNtupletGeneratorKernels.h.

◆ device_hitToTuple_apc_

template<typename TTraits, typename TTTraits>
cms::cuda::AtomicPairCounter* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_hitToTuple_apc_ = nullptr
protected

Definition at line 269 of file CAHitNtupletGeneratorKernels.h.

◆ device_hitToTupleStorage_

template<typename TTraits, typename TTTraits>
unique_ptr<uint32_t[]> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_hitToTupleStorage_
protected

Definition at line 264 of file CAHitNtupletGeneratorKernels.h.

◆ device_hitTuple_apc_

template<typename TTraits, typename TTTraits>
cms::cuda::AtomicPairCounter* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_hitTuple_apc_ = nullptr
protected

Definition at line 271 of file CAHitNtupletGeneratorKernels.h.

◆ device_isOuterHitOfCell_

template<typename TTraits, typename TTTraits>
unique_ptr<OuterHitOfCellContainer[]> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_isOuterHitOfCell_
protected

Definition at line 259 of file CAHitNtupletGeneratorKernels.h.

◆ device_nCells_

template<typename TTraits, typename TTTraits>
uint32_t* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_nCells_ = nullptr
protected

Definition at line 261 of file CAHitNtupletGeneratorKernels.h.

◆ device_storage_

template<typename TTraits, typename TTTraits>
unique_ptr<cms::cuda::AtomicPairCounter::c_type[]> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_storage_
protected

Definition at line 275 of file CAHitNtupletGeneratorKernels.h.

◆ device_theCellNeighbors_

template<typename TTraits, typename TTTraits>
unique_ptr<CellNeighborsVector> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_theCellNeighbors_
protected

Definition at line 253 of file CAHitNtupletGeneratorKernels.h.

◆ device_theCellNeighborsContainer_

template<typename TTraits, typename TTTraits>
CellNeighbors* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_theCellNeighborsContainer_
protected

Definition at line 254 of file CAHitNtupletGeneratorKernels.h.

◆ device_theCells_

template<typename TTraits, typename TTTraits>
unique_ptr<CACell[]> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_theCells_
protected

Definition at line 258 of file CAHitNtupletGeneratorKernels.h.

◆ device_theCellTracks_

template<typename TTraits, typename TTTraits>
unique_ptr<CellTracksVector> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_theCellTracks_
protected

Definition at line 255 of file CAHitNtupletGeneratorKernels.h.

◆ device_theCellTracksContainer_

template<typename TTraits, typename TTTraits>
CellTracks* CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_theCellTracksContainer_
protected

Definition at line 256 of file CAHitNtupletGeneratorKernels.h.

◆ device_tupleMultiplicity_

template<typename TTraits, typename TTTraits>
unique_ptr<TupleMultiplicity> CAHitNtupletGeneratorKernels< TTraits, TTTraits >::device_tupleMultiplicity_
protected

◆ hitToTupleView_

template<typename TTraits, typename TTTraits>
HitToTuple::View CAHitNtupletGeneratorKernels< TTraits, TTTraits >::hitToTupleView_
protected

Definition at line 265 of file CAHitNtupletGeneratorKernels.h.

◆ isOuterHitOfCell_

template<typename TTraits, typename TTTraits>
OuterHitOfCell CAHitNtupletGeneratorKernels< TTraits, TTTraits >::isOuterHitOfCell_
protected

Definition at line 260 of file CAHitNtupletGeneratorKernels.h.

◆ params_

template<typename TTraits, typename TTTraits>
Params CAHitNtupletGeneratorKernels< TTraits, TTTraits >::params_
protected

Definition at line 278 of file CAHitNtupletGeneratorKernels.h.

◆ paramsMaxDoubletes3Quarters_

template<typename TTraits, typename TTTraits>
const uint32_t CAHitNtupletGeneratorKernels< TTraits, TTTraits >::paramsMaxDoubletes3Quarters_
protected

Intermediate result avoiding repeated computations.

Definition at line 280 of file CAHitNtupletGeneratorKernels.h.

Referenced by CAHitNtupletGeneratorKernels< cms::cudacompat::CPUTraits, TrackerTraits >::nDoubletBlocks().