CMS 3D CMS Logo

SiStripRawToClusterGPUKernel.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiStripClusterizer_plugins_SiStripRawToClusterGPUKernel_h
2 #define RecoLocalTracker_SiStripClusterizer_plugins_SiStripRawToClusterGPUKernel_h
3 
6 
8 //#include "clusterGPU.cuh"
9 
10 #include <cuda_runtime.h>
11 
12 #include <vector>
13 #include <memory>
14 
15 class ChannelLocs;
16 class ChannelLocsGPU;
17 class FEDRawData;
18 
19 namespace sistrip {
20  class FEDBuffer;
21 }
22 namespace edm {
23  class ParameterSet;
24 }
25 
26 namespace stripgpu {
27  struct StripDataView;
28 
29  class StripDataGPU {
30  public:
31  StripDataGPU(size_t size, cudaStream_t stream);
32 
38  };
39 
41  public:
43  void makeAsync(const std::vector<const FEDRawData*>& rawdata,
44  const std::vector<std::unique_ptr<sistrip::FEDBuffer>>& buffers,
46  cudaStream_t stream);
47  void copyAsync(cudaStream_t stream);
49 
50  private:
52 
53  void reset();
54  void unpackChannelsGPU(const ConditionsDeviceView* conditions, cudaStream_t stream);
55  void allocateSSTDataGPU(int max_strips, cudaStream_t stream);
56  void freeSSTDataGPU(cudaStream_t stream);
57 
59  void findClusterGPU(const ConditionsDeviceView* conditions, cudaStream_t stream);
60 
61  std::vector<stripgpu::fedId_t> fedIndex_;
62  std::vector<size_t> fedRawDataOffsets_;
63 
64  std::unique_ptr<StripDataGPU> stripdata_;
65  std::unique_ptr<ChannelLocsGPU> chanlocsGPU_;
66 
69 
73  uint32_t maxClusterSize_;
75  };
76 } // namespace stripgpu
77 #endif
void allocateSSTDataGPU(int max_strips, cudaStream_t stream)
std::unique_ptr< ChannelLocsGPU > chanlocsGPU_
void makeAsync(const std::vector< const FEDRawData *> &rawdata, const std::vector< std::unique_ptr< sistrip::FEDBuffer >> &buffers, const SiStripClusterizerConditionsGPU &conditions, cudaStream_t stream)
cms::cuda::device::unique_ptr< StripDataView > pt_sst_data_d_
cms::cuda::device::unique_ptr< stripgpu::stripId_t[]> stripIdGPU_
void findClusterGPU(const ConditionsDeviceView *conditions, cudaStream_t stream)
StripDataGPU(size_t size, cudaStream_t stream)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
sistrip classes
cms::cuda::device::unique_ptr< uint8_t[]> alldataGPU_
cms::cuda::device::unique_ptr< int[]> seedStripsMask_
SiStripClustersCUDADevice getResults(cudaStream_t stream)
void unpackChannelsGPU(const ConditionsDeviceView *conditions, cudaStream_t stream)
cms::cuda::host::unique_ptr< StripDataView > sst_data_d_
cms::cuda::device::unique_ptr< uint16_t[]> channelGPU_
void freeSSTDataGPU(cudaStream_t stream)
HLT enums.
std::unique_ptr< T, impl::HostDeleter > unique_ptr
SiStripRawToClusterGPUKernel(const edm::ParameterSet &conf)
void copyAsync(cudaStream_t stream)
cms::cuda::device::unique_ptr< int[]> prefixSeedStripsNCMask_
void setSeedStripsNCIndexGPU(const ConditionsDeviceView *conditions, cudaStream_t stream)