◆ EcalPhase2DigiToGPUProducer()
EcalPhase2DigiToGPUProducer::EcalPhase2DigiToGPUProducer |
( |
const edm::ParameterSet & |
ps | ) |
|
|
explicit |
Definition at line 38 of file EcalPhase2DigiToGPUProducer.cc.
T getParameter(std::string const &) const
const edm::EDPutTokenT< cms::cuda::Product< ecal::DigisCollection< calo::common::DevStoragePolicy > > > digisCollectionToken_
const edm::EDGetTokenT< EBDigiCollectionPh2 > digiCollectionToken_
◆ ~EcalPhase2DigiToGPUProducer()
EcalPhase2DigiToGPUProducer::~EcalPhase2DigiToGPUProducer |
( |
| ) |
|
|
overridedefault |
◆ fillDescriptions()
◆ produce()
Definition at line 43 of file EcalPhase2DigiToGPUProducer.cc.
References cudaCheck, ecal::DigisCollection< StoragePolicy >::data, digiCollectionToken_, digisCollectionToken_, cms::cuda::impl::ScopedContextGetterBase::get(), mps_fire::i, ecal::DigisCollection< StoragePolicy >::ids, EcalDataFrame_Ph2::MAXSAMPLES, eostools::move(), PresampleTask_cfi::nSamples, redigi_cff::pdigi, EcalLiteDTUSample::raw(), ecalGpuTask_cfi::sample, and findQualityFiles::size.
49 const uint32_t
size = pdigis.size();
55 digis.
ids = cms::cuda::make_device_unique<uint32_t[]>(
size, ctx.stream());
59 auto idstmp = cms::cuda::make_host_unique<uint32_t[]>(
size, ctx.stream());
64 for (
const auto&
pdigi : pdigis) {
67 idstmp.get()[
i] =
pdigi.id();
80 cudaMemcpyAsync(digis.
ids.get(), idstmp.get(),
size *
sizeof(uint32_t), cudaMemcpyHostToDevice, ctx.stream()));
84 cudaMemcpyHostToDevice,
StoragePolicy::template StorageSelector< uint16_t >::type data
uint16_t raw() const
get the raw word
StoragePolicy::template StorageSelector< uint32_t >::type ids
const edm::EDPutTokenT< cms::cuda::Product< ecal::DigisCollection< calo::common::DevStoragePolicy > > > digisCollectionToken_
const edm::EDGetTokenT< EBDigiCollectionPh2 > digiCollectionToken_
static constexpr int MAXSAMPLES
#define cudaCheck(ARG,...)
const T & get(const Product< T > &data)
◆ digiCollectionToken_
◆ digisCollectionToken_