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