CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
SiPixelDigisCUDA Class Reference

#include <SiPixelDigisCUDA.h>

Public Types

using StoreType = uint16_t
 

Public Member Functions

cms::cuda::host::unique_ptr< StoreType[]> copyAllToHostAsync (cudaStream_t stream) const
 
uint32_t nDigis () const
 
uint32_t nModules () const
 
SiPixelDigisCUDAoperator= (const SiPixelDigisCUDA &)=delete
 
SiPixelDigisCUDAoperator= (SiPixelDigisCUDA &&)=default
 
void setNModulesDigis (uint32_t nModules, uint32_t nDigis)
 
 SiPixelDigisCUDA ()=default
 
 SiPixelDigisCUDA (size_t maxFedWords, cudaStream_t stream)
 
 SiPixelDigisCUDA (const SiPixelDigisCUDA &)=delete
 
 SiPixelDigisCUDA (SiPixelDigisCUDA &&)=default
 
SiPixelDigisCUDASOAView view ()
 
SiPixelDigisCUDASOAView const view () const
 
 ~SiPixelDigisCUDA ()=default
 

Private Attributes

cms::cuda::device::unique_ptr< StoreType[]> m_store
 
SiPixelDigisCUDASOAView m_view
 
uint32_t nDigis_h = 0
 
uint32_t nModules_h = 0
 

Detailed Description

Definition at line 11 of file SiPixelDigisCUDA.h.

Member Typedef Documentation

◆ StoreType

using SiPixelDigisCUDA::StoreType = uint16_t

Definition at line 13 of file SiPixelDigisCUDA.h.

Constructor & Destructor Documentation

◆ SiPixelDigisCUDA() [1/4]

SiPixelDigisCUDA::SiPixelDigisCUDA ( )
default

◆ SiPixelDigisCUDA() [2/4]

SiPixelDigisCUDA::SiPixelDigisCUDA ( size_t  maxFedWords,
cudaStream_t  stream 
)
explicit

Definition at line 8 of file SiPixelDigisCUDA.cc.

References cms::cuda::assert().

12  stream)),
14  assert(maxFedWords != 0);
15 }
static int roundFor128ByteAlignment(int size)
cms::cuda::device::unique_ptr< StoreType[]> m_store
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
assert(be >=bs)
SiPixelDigisCUDASOAView m_view
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)

◆ ~SiPixelDigisCUDA()

SiPixelDigisCUDA::~SiPixelDigisCUDA ( )
default

◆ SiPixelDigisCUDA() [3/4]

SiPixelDigisCUDA::SiPixelDigisCUDA ( const SiPixelDigisCUDA )
delete

◆ SiPixelDigisCUDA() [4/4]

SiPixelDigisCUDA::SiPixelDigisCUDA ( SiPixelDigisCUDA &&  )
default

Member Function Documentation

◆ copyAllToHostAsync()

cms::cuda::host::unique_ptr< SiPixelDigisCUDA::StoreType[]> SiPixelDigisCUDA::copyAllToHostAsync ( cudaStream_t  stream) const

Definition at line 17 of file SiPixelDigisCUDA.cc.

References SiPixelDigisCUDASOAView::clus(), cudaCheck, SiPixelDigisCUDASOAView::kMAX, m_view, nDigis(), runTheMatrix::ret, SiPixelDigisCUDASOAView::roundFor128ByteAlignment(), and cms::cuda::stream.

18  {
19  auto ret = cms::cuda::make_host_unique<StoreType[]>(
21  stream);
22  cudaCheck(cudaMemcpyAsync(ret.get(),
23  m_view.clus(),
26  cudaMemcpyDeviceToHost,
27  stream));
28  return ret;
29 }
static int roundFor128ByteAlignment(int size)
uint32_t nDigis() const
ret
prodAgent to be discontinued
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
const int32_t * clus() const
SiPixelDigisCUDASOAView m_view
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69

◆ nDigis()

uint32_t SiPixelDigisCUDA::nDigis ( ) const
inline

Definition at line 29 of file SiPixelDigisCUDA.h.

References nDigis_h.

Referenced by copyAllToHostAsync(), and setNModulesDigis().

29 { return nDigis_h; }

◆ nModules()

uint32_t SiPixelDigisCUDA::nModules ( ) const
inline

Definition at line 28 of file SiPixelDigisCUDA.h.

References nModules_h.

Referenced by setNModulesDigis().

28 { return nModules_h; }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SiPixelDigisCUDA& SiPixelDigisCUDA::operator= ( SiPixelDigisCUDA &&  )
default

◆ setNModulesDigis()

void SiPixelDigisCUDA::setNModulesDigis ( uint32_t  nModules,
uint32_t  nDigis 
)
inline

Definition at line 23 of file SiPixelDigisCUDA.h.

References nDigis(), nDigis_h, nModules(), and nModules_h.

Referenced by pixelgpudetails::SiPixelRawToClusterGPUKernel::getResults().

23  {
25  nDigis_h = nDigis;
26  }
uint32_t nDigis() const
uint32_t nModules() const

◆ view() [1/2]

SiPixelDigisCUDASOAView SiPixelDigisCUDA::view ( )
inline

Definition at line 33 of file SiPixelDigisCUDA.h.

References m_view.

33 { return m_view; }
SiPixelDigisCUDASOAView m_view

◆ view() [2/2]

SiPixelDigisCUDASOAView const SiPixelDigisCUDA::view ( ) const
inline

Definition at line 34 of file SiPixelDigisCUDA.h.

References m_view.

34 { return m_view; }
SiPixelDigisCUDASOAView m_view

Member Data Documentation

◆ m_store

cms::cuda::device::unique_ptr<StoreType[]> SiPixelDigisCUDA::m_store
private

Definition at line 38 of file SiPixelDigisCUDA.h.

◆ m_view

SiPixelDigisCUDASOAView SiPixelDigisCUDA::m_view
private

Definition at line 40 of file SiPixelDigisCUDA.h.

Referenced by copyAllToHostAsync(), and view().

◆ nDigis_h

uint32_t SiPixelDigisCUDA::nDigis_h = 0
private

Definition at line 43 of file SiPixelDigisCUDA.h.

Referenced by nDigis(), and setNModulesDigis().

◆ nModules_h

uint32_t SiPixelDigisCUDA::nModules_h = 0
private

Definition at line 42 of file SiPixelDigisCUDA.h.

Referenced by nModules(), and setNModulesDigis().