File indexing completed on 2024-04-06 12:25:47
0001 #ifndef RecoLocalCalo_HcalRecAlgos_interface_HcalRecoParamsWithPulseShapesGPU_h
0002 #define RecoLocalCalo_HcalRecAlgos_interface_HcalRecoParamsWithPulseShapesGPU_h
0003
0004 #ifndef __CUDACC__
0005 #include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
0006 #include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
0007 #endif
0008
0009 class HcalRecoParams;
0010
0011
0012
0013
0014
0015 class HcalRecoParamsWithPulseShapesGPU {
0016 public:
0017 struct Product {
0018 ~Product();
0019 uint32_t *param1 = nullptr, *param2 = nullptr;
0020 uint32_t *ids = nullptr;
0021
0022
0023 float *acc25nsVec = nullptr, *diff25nsItvlVec = nullptr, *accVarLenIdxMinusOneVec = nullptr,
0024 *diffVarItvlIdxMinusOneVec = nullptr, *accVarLenIdxZEROVec = nullptr, *diffVarItvlIdxZEROVec = nullptr;
0025 };
0026
0027 #ifndef __CUDACC__
0028
0029 HcalRecoParamsWithPulseShapesGPU(HcalRecoParams const &);
0030
0031
0032 ~HcalRecoParamsWithPulseShapesGPU() = default;
0033
0034
0035 Product const &getProduct(cudaStream_t) const;
0036
0037 private:
0038 uint64_t totalChannels_;
0039 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> param1_;
0040 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> param2_;
0041 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> ids_;
0042
0043 std::vector<float, cms::cuda::HostAllocator<float>> acc25nsVec_;
0044 std::vector<float, cms::cuda::HostAllocator<float>> diff25nsItvlVec_;
0045 std::vector<float, cms::cuda::HostAllocator<float>> accVarLenIdxMinusOneVec_;
0046 std::vector<float, cms::cuda::HostAllocator<float>> diffVarItvlIdxMinusOneVec_;
0047 std::vector<float, cms::cuda::HostAllocator<float>> accVarLenIdxZEROVec_;
0048 std::vector<float, cms::cuda::HostAllocator<float>> diffVarItvlIdxZEROVec_;
0049
0050 cms::cuda::ESProduct<Product> product_;
0051 #endif
0052 };
0053
0054 #endif