File indexing completed on 2024-04-06 12:02:14
0001 #ifndef CondFormats_HcalObjects_interface_HcalRecoParamsGPU_h
0002 #define CondFormats_HcalObjects_interface_HcalRecoParamsGPU_h
0003
0004 #include "FWCore/Utilities/interface/propagate_const_array.h"
0005 #include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h"
0006
0007 #ifndef __CUDACC__
0008 #include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
0009 #include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
0010 #endif
0011
0012 class HcalRecoParams;
0013
0014 class HcalRecoParamsGPU {
0015 public:
0016 struct Product {
0017 edm::propagate_const_array<cms::cuda::device::unique_ptr<uint32_t[]>> param1;
0018 edm::propagate_const_array<cms::cuda::device::unique_ptr<uint32_t[]>> param2;
0019 };
0020
0021 #ifndef __CUDACC__
0022
0023 HcalRecoParamsGPU(HcalRecoParams const&);
0024
0025
0026 ~HcalRecoParamsGPU() = default;
0027
0028
0029 Product const& getProduct(cudaStream_t) const;
0030
0031 private:
0032 uint64_t totalChannels_;
0033 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> param1_;
0034 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> param2_;
0035
0036 cms::cuda::ESProduct<Product> product_;
0037 #endif
0038 };
0039
0040 #endif