CondFormats
HcalObjects
interface
HcalPedestalsGPU.h
Go to the documentation of this file.
1
#ifndef CondFormats_HcalObjects_interface_HcalPedestalsGPU_h
2
#define CondFormats_HcalObjects_interface_HcalPedestalsGPU_h
3
4
#include "
CondFormats/HcalObjects/interface/HcalPedestals.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
12
13
class
HcalPedestalsGPU
{
14
public
:
15
struct
Product
{
16
edm::propagate_const_array<cms::cuda::device::unique_ptr<float[]>
>
values
;
17
edm::propagate_const_array<cms::cuda::device::unique_ptr<float[]>
>
widths
;
18
};
19
20
#ifndef __CUDACC__
21
// rearrange reco params
22
HcalPedestalsGPU
(
HcalPedestals
const
&);
23
24
// will trigger deallocation of Product thru ~Product
25
~HcalPedestalsGPU
() =
default
;
26
27
// get device pointers
28
Product
const
&
getProduct
(cudaStream_t)
const
;
29
30
// as in cpu version
31
bool
unitIsADC
()
const
{
return
unitIsADC_
; }
32
33
uint32_t
offsetForHashes
()
const
{
return
offsetForHashes_
; }
34
35
private
:
36
bool
unitIsADC_
;
37
uint64_t
totalChannels_
;
38
uint32_t
offsetForHashes_
;
39
std::vector<float, cms::cuda::HostAllocator<float>>
values_
;
40
std::vector<float, cms::cuda::HostAllocator<float>>
widths_
;
41
42
cms::cuda::ESProduct<Product>
product_
;
43
#endif
44
};
45
46
#endif
HcalPedestalsGPU::getProduct
const Product & getProduct(cudaStream_t) const
Definition:
HcalPedestalsGPU.cc:50
HcalPedestalsGPU::values_
std::vector< float, cms::cuda::HostAllocator< float > > values_
Definition:
HcalPedestalsGPU.h:39
HostAllocator.h
HcalPedestalsGPU::widths_
std::vector< float, cms::cuda::HostAllocator< float > > widths_
Definition:
HcalPedestalsGPU.h:40
HcalPedestalsGPU::Product::widths
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > widths
Definition:
HcalPedestalsGPU.h:17
HcalPedestals.h
device_unique_ptr.h
HcalPedestalsGPU::unitIsADC
bool unitIsADC() const
Definition:
HcalPedestalsGPU.h:31
HcalPedestalsGPU::product_
cms::cuda::ESProduct< Product > product_
Definition:
HcalPedestalsGPU.h:42
HcalPedestals
Definition:
HcalPedestals.h:20
HcalPedestalsGPU::offsetForHashes
uint32_t offsetForHashes() const
Definition:
HcalPedestalsGPU.h:33
cms::cuda::ESProduct
Definition:
ESProduct.h:19
HcalPedestalsGPU::unitIsADC_
bool unitIsADC_
Definition:
HcalPedestalsGPU.h:36
HcalPedestalsGPU::Product::values
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > values
Definition:
HcalPedestalsGPU.h:16
HcalPedestalsGPU
Definition:
HcalPedestalsGPU.h:13
HcalPedestalsGPU::HcalPedestalsGPU
HcalPedestalsGPU(HcalPedestals const &)
Definition:
HcalPedestalsGPU.cc:7
edm::propagate_const_array
Definition:
propagate_const_array.h:61
propagate_const_array.h
HcalPedestalsGPU::Product
Definition:
HcalPedestalsGPU.h:15
cond::uint64_t
unsigned long long uint64_t
Definition:
Time.h:13
HcalPedestalsGPU::totalChannels_
uint64_t totalChannels_
Definition:
HcalPedestalsGPU.h:37
ESProduct.h
HcalPedestalsGPU::offsetForHashes_
uint32_t offsetForHashes_
Definition:
HcalPedestalsGPU.h:38
HcalPedestalsGPU::~HcalPedestalsGPU
~HcalPedestalsGPU()=default
Generated for CMSSW Reference Manual by
1.8.16