CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
EcalLaserAPDPNRatiosRefGPU Class Reference

#include <EcalLaserAPDPNRatiosRefGPU.h>

Classes

struct  Product
 

Public Member Functions

 EcalLaserAPDPNRatiosRefGPU (EcalLaserAPDPNRatiosRef const &)
 
uint32_t getOffset () const
 
Product const & getProduct (cudaStream_t) const
 
 ~EcalLaserAPDPNRatiosRefGPU ()=default
 

Static Public Member Functions

static std::string name ()
 

Public Attributes

uint32_t offset_
 

Private Attributes

cms::cuda::ESProduct< Productproduct_
 
std::vector< float, cms::cuda::HostAllocator< float > > values_
 

Detailed Description

Definition at line 13 of file EcalLaserAPDPNRatiosRefGPU.h.

Constructor & Destructor Documentation

◆ EcalLaserAPDPNRatiosRefGPU()

EcalLaserAPDPNRatiosRefGPU::EcalLaserAPDPNRatiosRefGPU ( EcalLaserAPDPNRatiosRef const &  values)

Definition at line 6 of file EcalLaserAPDPNRatiosRefGPU.cc.

6  {
7  values_.reserve(values.size());
8  values_.insert(values_.end(), values.barrelItems().begin(), values.barrelItems().end());
9  values_.insert(values_.end(), values.endcapItems().begin(), values.endcapItems().end());
10  offset_ = values.barrelItems().size();
11 }

References offset_, contentValuesCheck::values, and values_.

◆ ~EcalLaserAPDPNRatiosRefGPU()

EcalLaserAPDPNRatiosRefGPU::~EcalLaserAPDPNRatiosRefGPU ( )
default

Member Function Documentation

◆ getOffset()

uint32_t EcalLaserAPDPNRatiosRefGPU::getOffset ( ) const
inline

Definition at line 31 of file EcalLaserAPDPNRatiosRefGPU.h.

31 { return offset_; }

References offset_.

◆ getProduct()

EcalLaserAPDPNRatiosRefGPU::Product const & EcalLaserAPDPNRatiosRefGPU::getProduct ( cudaStream_t  cudaStream) const

Definition at line 13 of file EcalLaserAPDPNRatiosRefGPU.cc.

13  {
14  auto const& product = product_.dataForCurrentDeviceAsync(
15  cudaStream, [this](EcalLaserAPDPNRatiosRefGPU::Product& product, cudaStream_t cudaStream) {
16  // allocate
17  product.values = cms::cuda::make_device_unique<float[]>(values_.size(), cudaStream);
18  // transfer
19  cms::cuda::copyAsync(product.values, values_, cudaStream);
20  });
21 
22  return product;
23 }

References cms::cuda::copyAsync(), product_, EcalLaserAPDPNRatiosRefGPU::Product::values, and values_.

Referenced by EcalRecHitProducerGPU::acquire().

◆ name()

static std::string EcalLaserAPDPNRatiosRefGPU::name ( )
inlinestatic

Definition at line 35 of file EcalLaserAPDPNRatiosRefGPU.h.

35 { return std::string{"ecalLaserAPDPNRatiosRefGPU"}; }

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

Member Data Documentation

◆ offset_

uint32_t EcalLaserAPDPNRatiosRefGPU::offset_

Definition at line 32 of file EcalLaserAPDPNRatiosRefGPU.h.

Referenced by EcalLaserAPDPNRatiosRefGPU(), and getOffset().

◆ product_

cms::cuda::ESProduct<Product> EcalLaserAPDPNRatiosRefGPU::product_
private

Definition at line 40 of file EcalLaserAPDPNRatiosRefGPU.h.

Referenced by getProduct().

◆ values_

std::vector<float, cms::cuda::HostAllocator<float> > EcalLaserAPDPNRatiosRefGPU::values_
private

Definition at line 38 of file EcalLaserAPDPNRatiosRefGPU.h.

Referenced by EcalLaserAPDPNRatiosRefGPU(), and getProduct().

contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalLaserAPDPNRatiosRefGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: EcalLaserAPDPNRatiosRefGPU.h:40
EcalLaserAPDPNRatiosRefGPU::values_
std::vector< float, cms::cuda::HostAllocator< float > > values_
Definition: EcalLaserAPDPNRatiosRefGPU.h:38
EcalLaserAPDPNRatiosRefGPU::Product::values
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > values
Definition: EcalLaserAPDPNRatiosRefGPU.h:16
EcalLaserAPDPNRatiosRefGPU::offset_
uint32_t offset_
Definition: EcalLaserAPDPNRatiosRefGPU.h:32
EcalLaserAPDPNRatiosRefGPU::Product
Definition: EcalLaserAPDPNRatiosRefGPU.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