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 
EcalRechitADCToGeVConstantGPU
Definition: EcalRechitADCToGeVConstantGPU.h:13
EcalRechitADCToGeVConstantGPU::Product::adc2gev
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > adc2gev
Definition: EcalRechitADCToGeVConstantGPU.h:16
typelookup.h
EcalADCToGeVConstant
Definition: EcalADCToGeVConstant.h:13
EcalRechitADCToGeVConstantGPU::getProduct
Product const & getProduct(cudaStream_t) const
Definition: EcalRechitADCToGeVConstantGPU.cc:13
EcalRechitADCToGeVConstantGPU.h
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
EcalRechitADCToGeVConstantGPU::EcalRechitADCToGeVConstantGPU
EcalRechitADCToGeVConstantGPU(EcalADCToGeVConstant const &)
Definition: EcalRechitADCToGeVConstantGPU.cc:6
EcalRechitADCToGeVConstantGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: EcalRechitADCToGeVConstantGPU.h:38
EcalRechitADCToGeVConstantGPU::adc2gev_
std::vector< float, cms::cuda::HostAllocator< float > > adc2gev_
Definition: EcalRechitADCToGeVConstantGPU.h:36
copyAsync.h
TYPELOOKUP_DATA_REG
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
EcalRechitADCToGeVConstantGPU::Product
Definition: EcalRechitADCToGeVConstantGPU.h:15
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20