CMS 3D CMS Logo

HcalRecoParamsWithPulseShapesGPU.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_HcalRecAlgos_interface_HcalRecoParamsWithPulseShapesGPU_h
2 #define RecoLocalCalo_HcalRecAlgos_interface_HcalRecoParamsWithPulseShapesGPU_h
3 
4 #ifndef __CUDACC__
7 #endif
8 
9 class HcalRecoParams;
10 
11 //
12 // TODO: HcalPulseShapes will need to be used via ESSource
13 // This is a workaround: precompute/store/transfer what's needed only
14 //
16 public:
17  struct Product {
18  ~Product();
19  uint32_t *param1 = nullptr, *param2 = nullptr;
20  uint32_t *ids = nullptr;
21 
22  // These guys come directly from PulseShapeFunctor class
23  float *acc25nsVec = nullptr, *diff25nsItvlVec = nullptr, *accVarLenIdxMinusOneVec = nullptr,
25  };
26 
27 #ifndef __CUDACC__
28  // rearrange reco params
30 
31  // will trigger deallocation of Product thru ~Product
33 
34  // get device pointers
35  Product const &getProduct(cudaStream_t) const;
36 
37 private:
39  std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> param1_;
40  std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> param2_;
41  std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> ids_;
42 
43  std::vector<float, cms::cuda::HostAllocator<float>> acc25nsVec_; // 256
44  std::vector<float, cms::cuda::HostAllocator<float>> diff25nsItvlVec_; // 256
45  std::vector<float, cms::cuda::HostAllocator<float>> accVarLenIdxMinusOneVec_; // 25
46  std::vector<float, cms::cuda::HostAllocator<float>> diffVarItvlIdxMinusOneVec_; // 25
47  std::vector<float, cms::cuda::HostAllocator<float>> accVarLenIdxZEROVec_; // 25
48  std::vector<float, cms::cuda::HostAllocator<float>> diffVarItvlIdxZEROVec_; // 25
49 
51 #endif
52 };
53 
54 #endif
HcalRecoParamsWithPulseShapesGPU::accVarLenIdxZEROVec_
std::vector< float, cms::cuda::HostAllocator< float > > accVarLenIdxZEROVec_
Definition: HcalRecoParamsWithPulseShapesGPU.h:47
HcalRecoParamsWithPulseShapesGPU::Product::accVarLenIdxMinusOneVec
float * accVarLenIdxMinusOneVec
Definition: HcalRecoParamsWithPulseShapesGPU.h:23
HostAllocator.h
HcalRecoParamsWithPulseShapesGPU::~HcalRecoParamsWithPulseShapesGPU
~HcalRecoParamsWithPulseShapesGPU()=default
HcalRecoParamsWithPulseShapesGPU::diffVarItvlIdxMinusOneVec_
std::vector< float, cms::cuda::HostAllocator< float > > diffVarItvlIdxMinusOneVec_
Definition: HcalRecoParamsWithPulseShapesGPU.h:46
HcalRecoParamsWithPulseShapesGPU::param1_
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > param1_
Definition: HcalRecoParamsWithPulseShapesGPU.h:39
HcalRecoParamsWithPulseShapesGPU::ids_
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > ids_
Definition: HcalRecoParamsWithPulseShapesGPU.h:41
HcalRecoParamsWithPulseShapesGPU::Product::param2
uint32_t * param2
Definition: HcalRecoParamsWithPulseShapesGPU.h:19
HcalRecoParamsWithPulseShapesGPU::accVarLenIdxMinusOneVec_
std::vector< float, cms::cuda::HostAllocator< float > > accVarLenIdxMinusOneVec_
Definition: HcalRecoParamsWithPulseShapesGPU.h:45
HcalRecoParamsWithPulseShapesGPU::Product
Definition: HcalRecoParamsWithPulseShapesGPU.h:17
cms::cuda::ESProduct
Definition: ESProduct.h:20
HcalRecoParamsWithPulseShapesGPU::Product::diffVarItvlIdxMinusOneVec
float * diffVarItvlIdxMinusOneVec
Definition: HcalRecoParamsWithPulseShapesGPU.h:24
HcalRecoParamsWithPulseShapesGPU::Product::diff25nsItvlVec
float * diff25nsItvlVec
Definition: HcalRecoParamsWithPulseShapesGPU.h:23
HcalRecoParamsWithPulseShapesGPU::acc25nsVec_
std::vector< float, cms::cuda::HostAllocator< float > > acc25nsVec_
Definition: HcalRecoParamsWithPulseShapesGPU.h:43
HcalRecoParamsWithPulseShapesGPU::diff25nsItvlVec_
std::vector< float, cms::cuda::HostAllocator< float > > diff25nsItvlVec_
Definition: HcalRecoParamsWithPulseShapesGPU.h:44
HcalRecoParamsWithPulseShapesGPU::diffVarItvlIdxZEROVec_
std::vector< float, cms::cuda::HostAllocator< float > > diffVarItvlIdxZEROVec_
Definition: HcalRecoParamsWithPulseShapesGPU.h:48
HcalRecoParamsWithPulseShapesGPU
Definition: HcalRecoParamsWithPulseShapesGPU.h:15
HcalRecoParamsWithPulseShapesGPU::Product::acc25nsVec
float * acc25nsVec
Definition: HcalRecoParamsWithPulseShapesGPU.h:23
HcalRecoParamsWithPulseShapesGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: HcalRecoParamsWithPulseShapesGPU.h:50
HcalRecoParamsWithPulseShapesGPU::Product::diffVarItvlIdxZEROVec
float * diffVarItvlIdxZEROVec
Definition: HcalRecoParamsWithPulseShapesGPU.h:24
HcalRecoParamsWithPulseShapesGPU::getProduct
const Product & getProduct(cudaStream_t) const
Definition: HcalRecoParamsWithPulseShapesGPU.cc:156
HcalRecoParamsWithPulseShapesGPU::Product::ids
uint32_t * ids
Definition: HcalRecoParamsWithPulseShapesGPU.h:20
HcalRecoParamsWithPulseShapesGPU::Product::accVarLenIdxZEROVec
float * accVarLenIdxZEROVec
Definition: HcalRecoParamsWithPulseShapesGPU.h:24
HcalRecoParamsWithPulseShapesGPU::totalChannels_
uint64_t totalChannels_
Definition: HcalRecoParamsWithPulseShapesGPU.h:38
HcalRecoParams
Definition: HcalRecoParams.h:9
HcalRecoParamsWithPulseShapesGPU::Product::~Product
~Product()
Definition: HcalRecoParamsWithPulseShapesGPU.cc:143
HcalRecoParamsWithPulseShapesGPU::Product::param1
uint32_t * param1
Definition: HcalRecoParamsWithPulseShapesGPU.h:19
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
HcalRecoParamsWithPulseShapesGPU::HcalRecoParamsWithPulseShapesGPU
HcalRecoParamsWithPulseShapesGPU(HcalRecoParams const &)
Definition: HcalRecoParamsWithPulseShapesGPU.cc:13
HcalRecoParamsWithPulseShapesGPU::param2_
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > param2_
Definition: HcalRecoParamsWithPulseShapesGPU.h:40
ESProduct.h