CMS 3D CMS Logo

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

#include <EcalSamplesCorrelationGPU.h>

Classes

struct  Product
 

Public Member Functions

 EcalSamplesCorrelationGPU (EcalSamplesCorrelation const &)
 
Product const & getProduct (cudaStream_t) const
 
 ~EcalSamplesCorrelationGPU ()=default
 

Static Public Member Functions

static std::string name ()
 

Private Attributes

std::vector< double, cms::cuda::HostAllocator< double > > EBG12SamplesCorrelation_
 
std::vector< double, cms::cuda::HostAllocator< double > > EBG1SamplesCorrelation_
 
std::vector< double, cms::cuda::HostAllocator< double > > EBG6SamplesCorrelation_
 
std::vector< double, cms::cuda::HostAllocator< double > > EEG12SamplesCorrelation_
 
std::vector< double, cms::cuda::HostAllocator< double > > EEG1SamplesCorrelation_
 
std::vector< double, cms::cuda::HostAllocator< double > > EEG6SamplesCorrelation_
 
cms::cuda::ESProduct< Productproduct_
 

Detailed Description

Definition at line 13 of file EcalSamplesCorrelationGPU.h.

Constructor & Destructor Documentation

◆ EcalSamplesCorrelationGPU()

EcalSamplesCorrelationGPU::EcalSamplesCorrelationGPU ( EcalSamplesCorrelation const &  values)

Definition at line 6 of file EcalSamplesCorrelationGPU.cc.

6  {
7  EBG12SamplesCorrelation_.reserve(values.EBG12SamplesCorrelation.size());
8  for (const auto& EBG12SamplesCorrelation : values.EBG12SamplesCorrelation) {
9  EBG12SamplesCorrelation_.emplace_back(EBG12SamplesCorrelation);
10  }
11 
12  EBG6SamplesCorrelation_.reserve(values.EBG6SamplesCorrelation.size());
13  for (const auto& EBG6SamplesCorrelation : values.EBG6SamplesCorrelation) {
14  EBG6SamplesCorrelation_.emplace_back(EBG6SamplesCorrelation);
15  }
16 
17  EBG1SamplesCorrelation_.reserve(values.EBG1SamplesCorrelation.size());
18  for (const auto& EBG1SamplesCorrelation : values.EBG1SamplesCorrelation) {
19  EBG1SamplesCorrelation_.emplace_back(EBG1SamplesCorrelation);
20  }
21 
22  EEG12SamplesCorrelation_.reserve(values.EEG12SamplesCorrelation.size());
23  for (const auto& EEG12SamplesCorrelation : values.EEG12SamplesCorrelation) {
24  EEG12SamplesCorrelation_.emplace_back(EEG12SamplesCorrelation);
25  }
26 
27  EEG6SamplesCorrelation_.reserve(values.EEG6SamplesCorrelation.size());
28  for (const auto& EEG6SamplesCorrelation : values.EEG6SamplesCorrelation) {
29  EEG6SamplesCorrelation_.emplace_back(EEG6SamplesCorrelation);
30  }
31 
32  EEG1SamplesCorrelation_.reserve(values.EEG1SamplesCorrelation.size());
33  for (const auto& EEG1SamplesCorrelation : values.EEG1SamplesCorrelation) {
34  EEG1SamplesCorrelation_.emplace_back(EEG1SamplesCorrelation);
35  }
36 }

References EBG12SamplesCorrelation_, EBG1SamplesCorrelation_, EBG6SamplesCorrelation_, EEG12SamplesCorrelation_, EEG1SamplesCorrelation_, EEG6SamplesCorrelation_, and contentValuesCheck::values.

◆ ~EcalSamplesCorrelationGPU()

EcalSamplesCorrelationGPU::~EcalSamplesCorrelationGPU ( )
default

Member Function Documentation

◆ getProduct()

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

Definition at line 38 of file EcalSamplesCorrelationGPU.cc.

38  {
39  auto const& product = product_.dataForCurrentDeviceAsync(
40  cudaStream, [this](EcalSamplesCorrelationGPU::Product& product, cudaStream_t cudaStream) {
41  // allocate
42  product.EBG12SamplesCorrelation =
43  cms::cuda::make_device_unique<double[]>(EBG12SamplesCorrelation_.size(), cudaStream);
44  product.EBG6SamplesCorrelation =
45  cms::cuda::make_device_unique<double[]>(EBG6SamplesCorrelation_.size(), cudaStream);
46  product.EBG1SamplesCorrelation =
47  cms::cuda::make_device_unique<double[]>(EBG1SamplesCorrelation_.size(), cudaStream);
48  product.EEG12SamplesCorrelation =
49  cms::cuda::make_device_unique<double[]>(EEG12SamplesCorrelation_.size(), cudaStream);
50  product.EEG6SamplesCorrelation =
51  cms::cuda::make_device_unique<double[]>(EEG6SamplesCorrelation_.size(), cudaStream);
52  product.EEG1SamplesCorrelation =
53  cms::cuda::make_device_unique<double[]>(EEG1SamplesCorrelation_.size(), cudaStream);
54  // transfer
61  });
62 
63  return product;
64 }

References cms::cuda::copyAsync(), EcalSamplesCorrelationGPU::Product::EBG12SamplesCorrelation, EBG12SamplesCorrelation_, EcalSamplesCorrelationGPU::Product::EBG1SamplesCorrelation, EBG1SamplesCorrelation_, EcalSamplesCorrelationGPU::Product::EBG6SamplesCorrelation, EBG6SamplesCorrelation_, EcalSamplesCorrelationGPU::Product::EEG12SamplesCorrelation, EEG12SamplesCorrelation_, EcalSamplesCorrelationGPU::Product::EEG1SamplesCorrelation, EEG1SamplesCorrelation_, EcalSamplesCorrelationGPU::Product::EEG6SamplesCorrelation, EEG6SamplesCorrelation_, and product_.

◆ name()

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

Definition at line 35 of file EcalSamplesCorrelationGPU.h.

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

References AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

◆ EBG12SamplesCorrelation_

std::vector<double, cms::cuda::HostAllocator<double> > EcalSamplesCorrelationGPU::EBG12SamplesCorrelation_
private

Definition at line 38 of file EcalSamplesCorrelationGPU.h.

Referenced by EcalSamplesCorrelationGPU(), and getProduct().

◆ EBG1SamplesCorrelation_

std::vector<double, cms::cuda::HostAllocator<double> > EcalSamplesCorrelationGPU::EBG1SamplesCorrelation_
private

Definition at line 40 of file EcalSamplesCorrelationGPU.h.

Referenced by EcalSamplesCorrelationGPU(), and getProduct().

◆ EBG6SamplesCorrelation_

std::vector<double, cms::cuda::HostAllocator<double> > EcalSamplesCorrelationGPU::EBG6SamplesCorrelation_
private

Definition at line 39 of file EcalSamplesCorrelationGPU.h.

Referenced by EcalSamplesCorrelationGPU(), and getProduct().

◆ EEG12SamplesCorrelation_

std::vector<double, cms::cuda::HostAllocator<double> > EcalSamplesCorrelationGPU::EEG12SamplesCorrelation_
private

Definition at line 41 of file EcalSamplesCorrelationGPU.h.

Referenced by EcalSamplesCorrelationGPU(), and getProduct().

◆ EEG1SamplesCorrelation_

std::vector<double, cms::cuda::HostAllocator<double> > EcalSamplesCorrelationGPU::EEG1SamplesCorrelation_
private

Definition at line 43 of file EcalSamplesCorrelationGPU.h.

Referenced by EcalSamplesCorrelationGPU(), and getProduct().

◆ EEG6SamplesCorrelation_

std::vector<double, cms::cuda::HostAllocator<double> > EcalSamplesCorrelationGPU::EEG6SamplesCorrelation_
private

Definition at line 42 of file EcalSamplesCorrelationGPU.h.

Referenced by EcalSamplesCorrelationGPU(), and getProduct().

◆ product_

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

Definition at line 45 of file EcalSamplesCorrelationGPU.h.

Referenced by getProduct().

EcalSamplesCorrelationGPU::EEG6SamplesCorrelation_
std::vector< double, cms::cuda::HostAllocator< double > > EEG6SamplesCorrelation_
Definition: EcalSamplesCorrelationGPU.h:42
EcalSamplesCorrelationGPU::EEG12SamplesCorrelation_
std::vector< double, cms::cuda::HostAllocator< double > > EEG12SamplesCorrelation_
Definition: EcalSamplesCorrelationGPU.h:41
EcalSamplesCorrelationGPU::Product
Definition: EcalSamplesCorrelationGPU.h:15
EcalSamplesCorrelationGPU::Product::EBG6SamplesCorrelation
edm::propagate_const_array< cms::cuda::device::unique_ptr< double[]> > EBG6SamplesCorrelation
Definition: EcalSamplesCorrelationGPU.h:17
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
EcalSamplesCorrelationGPU::EEG1SamplesCorrelation_
std::vector< double, cms::cuda::HostAllocator< double > > EEG1SamplesCorrelation_
Definition: EcalSamplesCorrelationGPU.h:43
EcalSamplesCorrelationGPU::Product::EBG12SamplesCorrelation
edm::propagate_const_array< cms::cuda::device::unique_ptr< double[]> > EBG12SamplesCorrelation
Definition: EcalSamplesCorrelationGPU.h:16
EcalSamplesCorrelationGPU::Product::EEG6SamplesCorrelation
edm::propagate_const_array< cms::cuda::device::unique_ptr< double[]> > EEG6SamplesCorrelation
Definition: EcalSamplesCorrelationGPU.h:20
EcalSamplesCorrelationGPU::Product::EEG1SamplesCorrelation
edm::propagate_const_array< cms::cuda::device::unique_ptr< double[]> > EEG1SamplesCorrelation
Definition: EcalSamplesCorrelationGPU.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSamplesCorrelationGPU::Product::EBG1SamplesCorrelation
edm::propagate_const_array< cms::cuda::device::unique_ptr< double[]> > EBG1SamplesCorrelation
Definition: EcalSamplesCorrelationGPU.h:18
EcalSamplesCorrelationGPU::EBG12SamplesCorrelation_
std::vector< double, cms::cuda::HostAllocator< double > > EBG12SamplesCorrelation_
Definition: EcalSamplesCorrelationGPU.h:38
EcalSamplesCorrelationGPU::Product::EEG12SamplesCorrelation
edm::propagate_const_array< cms::cuda::device::unique_ptr< double[]> > EEG12SamplesCorrelation
Definition: EcalSamplesCorrelationGPU.h:19
EcalSamplesCorrelationGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: EcalSamplesCorrelationGPU.h:45
EcalSamplesCorrelationGPU::EBG6SamplesCorrelation_
std::vector< double, cms::cuda::HostAllocator< double > > EBG6SamplesCorrelation_
Definition: EcalSamplesCorrelationGPU.h:39
EcalSamplesCorrelationGPU::EBG1SamplesCorrelation_
std::vector< double, cms::cuda::HostAllocator< double > > EBG1SamplesCorrelation_
Definition: EcalSamplesCorrelationGPU.h:40
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20