CMS 3D CMS Logo

SiPixelClustersCUDA.h
Go to the documentation of this file.
1 #ifndef CUDADataFormats_SiPixelCluster_interface_SiPixelClustersCUDA_h
2 #define CUDADataFormats_SiPixelCluster_interface_SiPixelClustersCUDA_h
3 
7 
10 
11 #include <cuda_runtime.h>
12 
14  SOA_COLUMN(uint32_t, moduleStart),
15  SOA_COLUMN(uint32_t, clusInModule),
16  SOA_COLUMN(uint32_t, moduleId),
17  SOA_COLUMN(uint32_t, clusModuleStart))
18 
22 
23 // TODO: The class is created via inheritance of the PortableDeviceCollection.
24 // This is generally discouraged, and should be done via composition, i.e.,
25 // by adding a public class attribute like:
26 // cms::cuda::Portabledevicecollection<SiPixelClustersCUDALayout<>> collection;
27 // See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
29 public:
30  SiPixelClustersCUDA() = default;
31  ~SiPixelClustersCUDA() = default;
32 
33  explicit SiPixelClustersCUDA(size_t maxModules, cudaStream_t stream)
35 
38 
39  void setNClusters(uint32_t nClusters, int32_t offsetBPIX2) {
40  nClusters_h = nClusters;
41  offsetBPIX2_h = offsetBPIX2;
42  }
43 
44  uint32_t nClusters() const { return nClusters_h; }
45  int32_t offsetBPIX2() const { return offsetBPIX2_h; }
46 
47 private:
48  uint32_t nClusters_h = 0;
49  int32_t offsetBPIX2_h = 0;
50 };
51 
52 #endif // CUDADataFormats_SiPixelCluster_interface_SiPixelClustersCUDA_h
Basic3DVector & operator=(const Basic3DVector &)=default
Assignment operator.
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
#define GENERATE_SOA_LAYOUT(CLASS,...)
Definition: SoALayout.h:431
SiPixelClustersCUDALayout<>::View SiPixelClustersCUDASOAView
Namespace of DDCMS conversion namespace.
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ moduleStart
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
SiPixelClustersCUDALayout<>::ConstView SiPixelClustersCUDASOAConstView
#define SOA_COLUMN(TYPE, NAME)
Definition: SoACommon.h:554