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  return product;
37 }
38 
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
string quality
Product const & getProduct(cudaStream_t) const
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
edm::propagate_const_array< cms::cuda::device::unique_ptr< uint32_t[]> > status
unsigned long long uint64_t
Definition: Time.h:13
HcalChannelQualityGPU(HcalChannelQuality const &)
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > status_
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
cms::cuda::ESProduct< Product > product_