File indexing completed on 2024-04-06 12:25:42
0001 #ifndef RecoLocalCalo_EcalRecProducers_plugins_DeclsForKernelsPhase2_h
0002 #define RecoLocalCalo_EcalRecProducers_plugins_DeclsForKernelsPhase2_h
0003
0004 #include "CUDADataFormats/EcalRecHitSoA/interface/EcalUncalibratedRecHit.h"
0005 #include "DataFormats/EcalDigi/interface/EcalDataFrame_Ph2.h"
0006
0007 namespace ecal {
0008 namespace weights {
0009
0010 struct EventOutputDataGPU {
0011 UncalibratedRecHit<::calo::common::DevStoragePolicy> recHits;
0012
0013 void allocate(uint32_t digi_size, cudaStream_t cudaStream) {
0014 auto const size = digi_size;
0015 recHits.amplitudesAll =
0016 cms::cuda::make_device_unique<reco::ComputationScalarType[]>(size * EcalDataFrame::MAXSAMPLES, cudaStream);
0017 recHits.amplitude = cms::cuda::make_device_unique<reco::StorageScalarType[]>(size, cudaStream);
0018 recHits.amplitudeError = cms::cuda::make_device_unique<reco::StorageScalarType[]>(size, cudaStream);
0019 recHits.chi2 = cms::cuda::make_device_unique<reco::StorageScalarType[]>(size, cudaStream);
0020 recHits.pedestal = cms::cuda::make_device_unique<reco::StorageScalarType[]>(size, cudaStream);
0021 recHits.did = cms::cuda::make_device_unique<uint32_t[]>(size, cudaStream);
0022 recHits.flags = cms::cuda::make_device_unique<uint32_t[]>(size, cudaStream);
0023 }
0024 };
0025 }
0026 }
0027
0028 #endif