CMS 3D CMS Logo

HcalChannelQualityGPU.cc
Go to the documentation of this file.
5 
6 // FIXME: add proper getters to conditions
8  : totalChannels_{quality.getAllContainers()[0].second.size() + quality.getAllContainers()[1].second.size()},
9  status_(totalChannels_) {
10  auto const containers = quality.getAllContainers();
11 
12  // fill in eb
13  auto const& barrelValues = containers[0].second;
14  for (uint64_t i = 0; i < barrelValues.size(); ++i) {
15  status_[i] = barrelValues[i].getValue();
16  }
17 
18  // fill in ee
19  auto const& endcapValues = containers[1].second;
20  auto const offset = barrelValues.size();
21  for (uint64_t i = 0; i < endcapValues.size(); ++i) {
22  status_[i + offset] = endcapValues[i].getValue();
23  }
24 }
25 
27  auto const& product =
28  product_.dataForCurrentDeviceAsync(stream, [this](HcalChannelQualityGPU::Product& product, cudaStream_t stream) {
29  // allocate
30  product.status = cms::cuda::make_device_unique<uint32_t[]>(status_.size(), stream);
31 
32  // transfer
34 
35  });
36 
37  return product;
38 }
39 
mps_fire.i
i
Definition: mps_fire.py:428
HcalChannelQualityGPU::Product
Definition: HcalChannelQualityGPU.h:15
cms::cuda::stream
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Definition: HistoContainer.h:51
typelookup.h
HcalChannelQualityGPU
Definition: HcalChannelQualityGPU.h:13
HcalChannelQualityGPU::Product::status
edm::propagate_const_array< cms::cuda::device::unique_ptr< uint32_t[]> > status
Definition: HcalChannelQualityGPU.h:16
HcalChannelQuality
Definition: HcalChannelQuality.h:17
HcalChannelQualityGPU::HcalChannelQualityGPU
HcalChannelQualityGPU(HcalChannelQuality const &)
Definition: HcalChannelQualityGPU.cc:7
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:122
copyAsync.h
TYPELOOKUP_DATA_REG
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
HcalChannelQuality.h
HcalChannelQualityGPU::getProduct
const Product & getProduct(cudaStream_t) const
Definition: HcalChannelQualityGPU.cc:26
HcalChannelQualityGPU::status_
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > status_
Definition: HcalChannelQualityGPU.h:31
HcalChannelQualityGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: HcalChannelQualityGPU.h:33
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
HcalChannelQualityGPU.h
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20