CondFormats
EcalObjects
interface
EcalGainRatiosGPU.h
Go to the documentation of this file.
1
#ifndef CondFormats_EcalObjects_interface_EcalGainRatiosGPU_h
2
#define CondFormats_EcalObjects_interface_EcalGainRatiosGPU_h
3
4
#include "
CondFormats/EcalObjects/interface/EcalGainRatios.h
"
5
#include "
FWCore/Utilities/interface/propagate_const_array.h
"
6
#include "
HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h
"
7
8
#ifndef __CUDACC__
9
#include "
HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h
"
10
#include "
HeterogeneousCore/CUDACore/interface/ESProduct.h
"
11
#endif // __CUDACC__
12
13
class
EcalGainRatiosGPU
{
14
public
:
15
struct
Product
{
16
edm::propagate_const_array<cms::cuda::device::unique_ptr<float[]>
>
gain12Over6
;
17
edm::propagate_const_array<cms::cuda::device::unique_ptr<float[]>
>
gain6Over1
;
18
};
19
20
#ifndef __CUDACC__
21
22
// rearrange pedestals
23
EcalGainRatiosGPU
(
EcalGainRatios
const
&);
24
25
// will call dealloation for Product thru ~Product
26
~EcalGainRatiosGPU
() =
default
;
27
28
// get device pointers
29
Product
const
&
getProduct
(cudaStream_t)
const
;
30
31
//
32
static
std::string
name
() {
return
std::string
{
"ecalGainRatiosGPU"
}; }
33
34
private
:
35
// in the future, we need to arrange so to avoid this copy on the host
36
// store eb first then ee
37
std::vector<float, cms::cuda::HostAllocator<float>>
gain12Over6_
;
38
std::vector<float, cms::cuda::HostAllocator<float>>
gain6Over1_
;
39
40
cms::cuda::ESProduct<Product>
product_
;
41
42
#endif // __CUDACC__
43
};
44
45
#endif // CondFormats_EcalObjects_interface_EcalGainRatiosGPU_h
EcalGainRatiosGPU::EcalGainRatiosGPU
EcalGainRatiosGPU(EcalGainRatios const &)
Definition:
EcalGainRatiosGPU.cc:6
EcalGainRatiosGPU::getProduct
Product const & getProduct(cudaStream_t) const
Definition:
EcalGainRatiosGPU.cc:24
EcalGainRatiosGPU::name
static std::string name()
Definition:
EcalGainRatiosGPU.h:32
EcalGainRatiosGPU::Product::gain6Over1
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > gain6Over1
Definition:
EcalGainRatiosGPU.h:17
EcalGainRatiosGPU::Product
Definition:
EcalGainRatiosGPU.h:15
EcalGainRatiosGPU::Product::gain12Over6
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > gain12Over6
Definition:
EcalGainRatiosGPU.h:16
HostAllocator.h
EcalGainRatiosGPU::product_
cms::cuda::ESProduct< Product > product_
Definition:
EcalGainRatiosGPU.h:40
device_unique_ptr.h
EcalCondObjectContainer
Definition:
EcalCondObjectContainer.h:13
cms::cuda::ESProduct
Definition:
ESProduct.h:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EcalGainRatiosGPU::gain12Over6_
std::vector< float, cms::cuda::HostAllocator< float > > gain12Over6_
Definition:
EcalGainRatiosGPU.h:37
EcalGainRatios.h
edm::propagate_const_array
Definition:
propagate_const_array.h:61
propagate_const_array.h
EcalGainRatiosGPU::~EcalGainRatiosGPU
~EcalGainRatiosGPU()=default
EcalGainRatiosGPU::gain6Over1_
std::vector< float, cms::cuda::HostAllocator< float > > gain6Over1_
Definition:
EcalGainRatiosGPU.h:38
EcalGainRatiosGPU
Definition:
EcalGainRatiosGPU.h:13
ESProduct.h
Generated for CMSSW Reference Manual by
1.8.16