CMS 3D CMS Logo

EcalRechitADCToGeVConstantGPU.cc
Go to the documentation of this file.
2 
5 
7  : adc2gev_(2) // size is 2, one form EB and one for EE
8 {
9  adc2gev_[0] = values.getEBValue();
10  adc2gev_[1] = values.getEEValue();
11 }
12 
14  auto const& product = product_.dataForCurrentDeviceAsync(
15  cudaStream, [this](EcalRechitADCToGeVConstantGPU::Product& product, cudaStream_t cudaStream) {
16  // allocate
17  product.adc2gev = cms::cuda::make_device_unique<float[]>(adc2gev_.size(), cudaStream);
18  // transfer
19  cms::cuda::copyAsync(product.adc2gev, adc2gev_, cudaStream);
20  });
21 
22  return product;
23 }
24 
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > adc2gev
cms::cuda::ESProduct< Product > product_
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
Product const & getProduct(cudaStream_t) const
std::vector< float, cms::cuda::HostAllocator< float > > adc2gev_
EcalRechitADCToGeVConstantGPU(EcalADCToGeVConstant const &)
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102