CMS 3D CMS Logo

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

#include <HGCUncalibRecHitDevice.h>

Public Member Functions

void defineSoAMemoryLayout_ ()
 
HGCUncalibRecHitSoA get () const
 
 HGCUncalibRecHitDevice ()=default
 
 HGCUncalibRecHitDevice (const HGCUncalibRecHitDevice &)=delete
 
 HGCUncalibRecHitDevice (HGCUncalibRecHitDevice &&)=default
 
 HGCUncalibRecHitDevice (uint32_t nhits, const cudaStream_t &stream)
 
uint32_t nBytes () const
 
uint32_t nHits () const
 
HGCUncalibRecHitDeviceoperator= (const HGCUncalibRecHitDevice &)=delete
 
HGCUncalibRecHitDeviceoperator= (HGCUncalibRecHitDevice &&)=default
 
uint32_t pad () const
 
 ~HGCUncalibRecHitDevice ()=default
 

Private Attributes

uint32_t nhits_
 
uint32_t pad_
 
cms::cuda::device::unique_ptr< std::byte[]> ptr_
 
uint32_t size_tot_
 
HGCUncalibRecHitSoA soa_
 

Static Private Attributes

static constexpr std::array< int, memory::npointers::ntypes_hgcuncalibrechits_soasizes_
 

Detailed Description

Definition at line 11 of file HGCUncalibRecHitDevice.h.

Constructor & Destructor Documentation

◆ HGCUncalibRecHitDevice() [1/4]

HGCUncalibRecHitDevice::HGCUncalibRecHitDevice ( )
default

◆ HGCUncalibRecHitDevice() [2/4]

HGCUncalibRecHitDevice::HGCUncalibRecHitDevice ( uint32_t  nhits,
const cudaStream_t &  stream 
)
explicit

Definition at line 3 of file HGCUncalibRecHitDevice.cc.

3  : nhits_(nhits) {
4  size_tot_ = std::accumulate(sizes_.begin(), sizes_.end(), 0); //this might be done at compile time
5  pad_ = ((nhits - 1) / 32 + 1) * 32; //align to warp boundary (assumption: warpSize = 32)
6  ptr_ = cms::cuda::make_device_unique<std::byte[]>(pad_ * size_tot_, stream);
7 
9 }

References defineSoAMemoryLayout_(), nhits, pad_, ptr_, size_tot_, sizes_, and cms::cuda::stream.

◆ ~HGCUncalibRecHitDevice()

HGCUncalibRecHitDevice::~HGCUncalibRecHitDevice ( )
default

◆ HGCUncalibRecHitDevice() [3/4]

HGCUncalibRecHitDevice::HGCUncalibRecHitDevice ( const HGCUncalibRecHitDevice )
delete

◆ HGCUncalibRecHitDevice() [4/4]

HGCUncalibRecHitDevice::HGCUncalibRecHitDevice ( HGCUncalibRecHitDevice &&  )
default

Member Function Documentation

◆ defineSoAMemoryLayout_()

void HGCUncalibRecHitDevice::defineSoAMemoryLayout_ ( )

◆ get()

HGCUncalibRecHitSoA HGCUncalibRecHitDevice::get ( ) const
inline

◆ nBytes()

uint32_t HGCUncalibRecHitDevice::nBytes ( ) const
inline

Definition at line 26 of file HGCUncalibRecHitDevice.h.

26 { return size_tot_; }

References size_tot_.

◆ nHits()

uint32_t HGCUncalibRecHitDevice::nHits ( ) const
inline

Definition at line 24 of file HGCUncalibRecHitDevice.h.

24 { return nhits_; }

References nhits_.

◆ operator=() [1/2]

HGCUncalibRecHitDevice& HGCUncalibRecHitDevice::operator= ( const HGCUncalibRecHitDevice )
delete

◆ operator=() [2/2]

HGCUncalibRecHitDevice& HGCUncalibRecHitDevice::operator= ( HGCUncalibRecHitDevice &&  )
default

◆ pad()

uint32_t HGCUncalibRecHitDevice::pad ( ) const
inline

Definition at line 25 of file HGCUncalibRecHitDevice.h.

25 { return pad_; }

References pad_.

Member Data Documentation

◆ nhits_

uint32_t HGCUncalibRecHitDevice::nhits_
private

Definition at line 36 of file HGCUncalibRecHitDevice.h.

Referenced by defineSoAMemoryLayout_(), and nHits().

◆ pad_

uint32_t HGCUncalibRecHitDevice::pad_
private

Definition at line 35 of file HGCUncalibRecHitDevice.h.

Referenced by defineSoAMemoryLayout_(), HGCUncalibRecHitDevice(), and pad().

◆ ptr_

cms::cuda::device::unique_ptr<std::byte[]> HGCUncalibRecHitDevice::ptr_
private

Definition at line 29 of file HGCUncalibRecHitDevice.h.

Referenced by defineSoAMemoryLayout_(), and HGCUncalibRecHitDevice().

◆ size_tot_

uint32_t HGCUncalibRecHitDevice::size_tot_
private

Definition at line 37 of file HGCUncalibRecHitDevice.h.

Referenced by defineSoAMemoryLayout_(), HGCUncalibRecHitDevice(), and nBytes().

◆ sizes_

constexpr std::array<int, memory::npointers::ntypes_hgcuncalibrechits_soa> HGCUncalibRecHitDevice::sizes_
staticconstexprprivate
Initial value:

Definition at line 31 of file HGCUncalibRecHitDevice.h.

Referenced by HGCUncalibRecHitDevice().

◆ soa_

HGCUncalibRecHitSoA HGCUncalibRecHitDevice::soa_
private

Definition at line 30 of file HGCUncalibRecHitDevice.h.

Referenced by defineSoAMemoryLayout_(), and get().

HGCUncalibRecHitDevice::size_tot_
uint32_t size_tot_
Definition: HGCUncalibRecHitDevice.h:37
HGCUncalibRecHitSoA::jitter_
float * jitter_
Definition: HGCUncalibRecHitSoA.h:10
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
HGCUncalibRecHitSoA::pad_
std::uint32_t pad_
Definition: HGCUncalibRecHitSoA.h:21
HGCUncalibRecHitSoA::amplitude_
float * amplitude_
Definition: HGCUncalibRecHitSoA.h:8
memory::npointers::uint32_hgcuncalibrechits_soa
constexpr unsigned uint32_hgcuncalibrechits_soa
Definition: HGCUncalibRecHitSoA.h:27
HGCUncalibRecHitDevice::ptr_
cms::cuda::device::unique_ptr< std::byte[]> ptr_
Definition: HGCUncalibRecHitDevice.h:29
HGCUncalibRecHitSoA::nhits_
std::uint32_t nhits_
Definition: HGCUncalibRecHitSoA.h:20
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
HGCUncalibRecHitSoA::pedestal_
float * pedestal_
Definition: HGCUncalibRecHitSoA.h:9
memory::npointers::float_hgcuncalibrechits_soa
constexpr unsigned float_hgcuncalibrechits_soa
Definition: HGCUncalibRecHitSoA.h:26
HGCUncalibRecHitDevice::soa_
HGCUncalibRecHitSoA soa_
Definition: HGCUncalibRecHitDevice.h:30
HGCUncalibRecHitSoA::aux_
std::uint32_t * aux_
Definition: HGCUncalibRecHitSoA.h:16
HGCUncalibRecHitSoA::chi2_
float * chi2_
Definition: HGCUncalibRecHitSoA.h:11
HGCUncalibRecHitSoA::id_
std::uint32_t * id_
Definition: HGCUncalibRecHitSoA.h:17
HGCUncalibRecHitDevice::sizes_
static constexpr std::array< int, memory::npointers::ntypes_hgcuncalibrechits_soa > sizes_
Definition: HGCUncalibRecHitDevice.h:31
HGCUncalibRecHitDevice::nhits_
uint32_t nhits_
Definition: HGCUncalibRecHitDevice.h:36
nhits
Definition: HIMultiTrackSelector.h:42
HGCUncalibRecHitSoA::nbytes_
std::uint32_t nbytes_
Definition: HGCUncalibRecHitSoA.h:19
HGCUncalibRecHitSoA::OOTchi2_
float * OOTchi2_
Definition: HGCUncalibRecHitSoA.h:13
HGCUncalibRecHitDevice::pad_
uint32_t pad_
Definition: HGCUncalibRecHitDevice.h:35
HGCUncalibRecHitSoA::flags_
std::uint32_t * flags_
Definition: HGCUncalibRecHitSoA.h:15
HGCUncalibRecHitSoA::OOTamplitude_
float * OOTamplitude_
Definition: HGCUncalibRecHitSoA.h:12
HGCUncalibRecHitDevice::defineSoAMemoryLayout_
void defineSoAMemoryLayout_()
Definition: HGCUncalibRecHitDevice.cc:11