CMS 3D CMS Logo

SiPixelDigisCUDA.h
Go to the documentation of this file.
1 #ifndef CUDADataFormats_SiPixelDigi_interface_SiPixelDigisCUDA_h
2 #define CUDADataFormats_SiPixelDigi_interface_SiPixelDigisCUDA_h
3 
4 #include <cuda_runtime.h>
5 
12 
13 // TODO: The class is created via inheritance of the PortableDeviceCollection.
14 // This is generally discouraged, and should be done via composition.
15 // See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
16 class SiPixelDigisCUDA : public cms::cuda::PortableDeviceCollection<SiPixelDigisSoA> {
17 public:
18  SiPixelDigisCUDA() = default;
19  explicit SiPixelDigisCUDA(size_t maxFedWords, cudaStream_t stream)
20  : PortableDeviceCollection<SiPixelDigisSoA>(maxFedWords + 1, stream) {}
21 
22  ~SiPixelDigisCUDA() = default;
23 
24  SiPixelDigisCUDA(SiPixelDigisCUDA &&) = default;
26 
27  void setNModulesDigis(uint32_t nModules, uint32_t nDigis) {
29  nDigis_h = nDigis;
30  }
31 
32  uint32_t nModules() const { return nModules_h; }
33  uint32_t nDigis() const { return nDigis_h; }
34 
35 private:
36  uint32_t nModules_h = 0;
37  uint32_t nDigis_h = 0;
38 };
39 
40 #endif // CUDADataFormats_SiPixelDigi_interface_SiPixelDigisCUDA_h
uint32_t nDigis() const
~SiPixelDigisCUDA()=default
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
SiPixelDigisCUDA(size_t maxFedWords, cudaStream_t stream)
SiPixelDigisCUDA()=default
SiPixelDigisCUDA & operator=(SiPixelDigisCUDA &&)=default
void setNModulesDigis(uint32_t nModules, uint32_t nDigis)
uint32_t nModules() const