1 #ifndef RecoLocalTracker_SiPixelClusterizer_plugins_SiPixelRawToClusterGPUKernel_h 2 #define RecoLocalTracker_SiPixelClusterizer_plugins_SiPixelRawToClusterGPUKernel_h 6 #include <cuda_runtime.h> 28 inline namespace phase1geometry {
68 return (row << thePacking.row_shift) | (
col << thePacking.column_shift) | (
adc << thePacking.adc_shift);
73 return (row << thePacking.column_width) |
col;
76 template <
typename TrackerTraits>
82 :
word_{cms::cuda::make_host_unique<unsigned int[]>(words,
stream)},
83 fedId_{cms::cuda::make_host_unique<unsigned char[]>(words,
stream)} {}
90 const unsigned int*
word()
const {
return word_.get(); }
108 const unsigned char* modToUnp,
112 const uint32_t wordCounter,
113 const uint32_t fedCounter,
120 const uint16_t* moduleIds,
121 const uint16_t* xDigis,
122 const uint16_t* yDigis,
123 const uint16_t* adcDigis,
124 const uint32_t* packedData,
125 const uint32_t* rawIds,
126 const uint32_t numDigis,
129 std::pair<SiPixelDigisCUDA, SiPixelClustersCUDA>
getResults() {
135 std::cout <<
"SiPixelClusterizerCUDA results:" << std::endl
136 <<
" > no. of digis: " <<
nDigis << std::endl
165 #endif // RecoLocalTracker_SiPixelClusterizer_plugins_SiPixelRawToClusterGPUKernel_h
SiPixelDigiErrorsCUDA digiErrors_d
void makePhase1ClustersAsync(const SiPixelClusterThresholds clusterThresholds, const SiPixelROCsStatusAndMapping *cablingMap, const unsigned char *modToUnp, const SiPixelGainForHLTonGPU *gains, const WordFedAppender &wordFed, SiPixelFormatterErrors &&errors, const uint32_t wordCounter, const uint32_t fedCounter, bool useQualityInfo, bool includeErrors, bool debug, cudaStream_t stream)
const uint32_t maxROCIndex
const uint32_t diskStartBit
const uint32_t bladeStartBit
SiPixelClustersCUDA clusters_d
void initializeWordFed(int fedId, unsigned int index, cms_uint32_t const *src, unsigned int length)
cms::cuda::host::unique_ptr< uint32_t[]> nModules_Clusters_h
const uint32_t numRowsInRoc
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
SiPixelRawToClusterGPUKernel()=default
const uint32_t panelStartBit
SiPixelDigiErrorsCUDA && getErrors()
void makePhase2ClustersAsync(const SiPixelClusterThresholds clusterThresholds, const uint16_t *moduleIds, const uint16_t *xDigis, const uint16_t *yDigis, const uint16_t *adcDigis, const uint32_t *packedData, const uint32_t *rawIds, const uint32_t numDigis, cudaStream_t stream)
~SiPixelRawToClusterGPUKernel()=default
WordFedAppender(uint32_t words, cudaStream_t stream)
static constexpr Packing thePacking
const uint32_t numColsInRoc
const uint32_t ladderMask
const unsigned int * word() const
std::pair< SiPixelDigisCUDA, SiPixelClustersCUDA > getResults()
const uint32_t moduleMask
unsigned int cms_uint32_t
constexpr float gains[NGAINS]
void setNClusters(uint32_t nClusters, int32_t offsetBPIX2)
cms::cuda::host::unique_ptr< unsigned int[]> word_
const uint32_t ladderStartBit
const uint32_t layerStartBit
cms::cuda::host::unique_ptr< unsigned char[]> fedId_
constexpr pixelchannelidentifierimpl::Packing packing()
constexpr uint32_t pack(uint32_t row, uint32_t col, uint32_t adc, uint32_t flag=0)
void setNModulesDigis(uint32_t nModules, uint32_t nDigis)
const uint32_t moduleStartBit
std::unique_ptr< T, impl::HostDeleter > unique_ptr
const unsigned char * fedId() const
constexpr uint32_t pixelToChannel(int row, int col)
SiPixelRawToClusterGPUKernel & operator=(const SiPixelRawToClusterGPUKernel &)=delete
uint16_t *__restrict__ uint16_t const *__restrict__ adc