CMS 3D CMS Logo

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

#include <HGCRecHitCPUProduct.h>

Public Member Functions

HGCRecHitSoA get ()
 
ConstHGCRecHitSoA get () const
 
 HGCRecHitCPUProduct ()=default
 
 HGCRecHitCPUProduct (const HGCRecHitCPUProduct &)=delete
 
 HGCRecHitCPUProduct (HGCRecHitCPUProduct &&)=default
 
 HGCRecHitCPUProduct (uint32_t nhits, const cudaStream_t &stream)
 
uint32_t nBytes () const
 
uint32_t nHits () const
 
HGCRecHitCPUProductoperator= (const HGCRecHitCPUProduct &)=delete
 
HGCRecHitCPUProductoperator= (HGCRecHitCPUProduct &&)=default
 
uint32_t pad () const
 
 ~HGCRecHitCPUProduct ()=default
 

Private Attributes

cms::cuda::host::unique_ptr< std::byte[]> mem_
 
uint32_t nhits_
 
uint32_t pad_
 
uint32_t size_tot_
 

Static Private Attributes

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

Detailed Description

Definition at line 12 of file HGCRecHitCPUProduct.h.

Constructor & Destructor Documentation

◆ HGCRecHitCPUProduct() [1/4]

HGCRecHitCPUProduct::HGCRecHitCPUProduct ( )
default

◆ HGCRecHitCPUProduct() [2/4]

HGCRecHitCPUProduct::HGCRecHitCPUProduct ( uint32_t  nhits,
const cudaStream_t &  stream 
)
inlineexplicit

Definition at line 15 of file HGCRecHitCPUProduct.h.

15  : nhits_(nhits) {
16  size_tot_ = std::accumulate(sizes_.begin(), sizes_.end(), 0); //this might be done at compile time
17  pad_ = ((nhits - 1) / 32 + 1) * 32; //align to warp boundary (assumption: warpSize = 32)
18  mem_ = cms::cuda::make_host_unique<std::byte[]>(pad_ * size_tot_, stream);
19  }

References mem_, nhits, pad_, size_tot_, sizes_, and cms::cuda::stream.

◆ ~HGCRecHitCPUProduct()

HGCRecHitCPUProduct::~HGCRecHitCPUProduct ( )
default

◆ HGCRecHitCPUProduct() [3/4]

HGCRecHitCPUProduct::HGCRecHitCPUProduct ( const HGCRecHitCPUProduct )
delete

◆ HGCRecHitCPUProduct() [4/4]

HGCRecHitCPUProduct::HGCRecHitCPUProduct ( HGCRecHitCPUProduct &&  )
default

Member Function Documentation

◆ get() [1/2]

HGCRecHitSoA HGCRecHitCPUProduct::get ( )
inline

◆ get() [2/2]

ConstHGCRecHitSoA HGCRecHitCPUProduct::get ( ) const
inline

◆ nBytes()

uint32_t HGCRecHitCPUProduct::nBytes ( ) const
inline

Definition at line 52 of file HGCRecHitCPUProduct.h.

52 { return size_tot_; }

References size_tot_.

◆ nHits()

uint32_t HGCRecHitCPUProduct::nHits ( ) const
inline

Definition at line 50 of file HGCRecHitCPUProduct.h.

50 { return nhits_; }

References nhits_.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

HGCRecHitCPUProduct& HGCRecHitCPUProduct::operator= ( HGCRecHitCPUProduct &&  )
default

◆ pad()

uint32_t HGCRecHitCPUProduct::pad ( ) const
inline

Definition at line 51 of file HGCRecHitCPUProduct.h.

51 { return pad_; }

References pad_.

Member Data Documentation

◆ mem_

cms::cuda::host::unique_ptr<std::byte[]> HGCRecHitCPUProduct::mem_
private

Definition at line 55 of file HGCRecHitCPUProduct.h.

Referenced by get(), and HGCRecHitCPUProduct().

◆ nhits_

uint32_t HGCRecHitCPUProduct::nhits_
private

Definition at line 61 of file HGCRecHitCPUProduct.h.

Referenced by get(), and nHits().

◆ pad_

uint32_t HGCRecHitCPUProduct::pad_
private

Definition at line 60 of file HGCRecHitCPUProduct.h.

Referenced by get(), HGCRecHitCPUProduct(), and pad().

◆ size_tot_

uint32_t HGCRecHitCPUProduct::size_tot_
private

Definition at line 62 of file HGCRecHitCPUProduct.h.

Referenced by get(), HGCRecHitCPUProduct(), and nBytes().

◆ sizes_

constexpr std::array<int, memory::npointers::ntypes_hgcrechits_soa> HGCRecHitCPUProduct::sizes_
staticconstexprprivate
Initial value:

Definition at line 56 of file HGCRecHitCPUProduct.h.

Referenced by HGCRecHitCPUProduct().

dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
cms::cuda::stream
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Definition: HistoContainer.h:51
gpuVertexFinder::soa
ZVertexSoA * soa
Definition: gpuVertexFinder.cc:21
nhits
Definition: HIMultiTrackSelector.h:42
HGCRecHitSoA
Definition: HGCRecHitSoA.h:6
HGCRecHitCPUProduct::mem_
cms::cuda::host::unique_ptr< std::byte[]> mem_
Definition: HGCRecHitCPUProduct.h:55
memory::npointers::uint32_hgcrechits_soa
constexpr unsigned uint32_hgcrechits_soa
Definition: HGCRecHitSoA.h:23
HGCRecHitCPUProduct::size_tot_
uint32_t size_tot_
Definition: HGCRecHitCPUProduct.h:62
ConstHGCRecHitSoA
Definition: ConstHGCRecHitSoA.h:6
HGCRecHitCPUProduct::sizes_
static constexpr std::array< int, memory::npointers::ntypes_hgcrechits_soa > sizes_
Definition: HGCRecHitCPUProduct.h:56
memory::npointers::uint8_hgcrechits_soa
constexpr unsigned uint8_hgcrechits_soa
Definition: HGCRecHitSoA.h:24
HGCRecHitCPUProduct::pad_
uint32_t pad_
Definition: HGCRecHitCPUProduct.h:60
memory::npointers::float_hgcrechits_soa
constexpr unsigned float_hgcrechits_soa
Definition: HGCRecHitSoA.h:22
HGCRecHitCPUProduct::nhits_
uint32_t nhits_
Definition: HGCRecHitCPUProduct.h:61