CMS 3D CMS Logo

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

#include <SiPixelDigisCUDA.h>

Classes

class  DeviceConstView
 

Public Member Functions

uint16_t * adc ()
 
const uint16_t * adc () const
 
cms::cuda::host::unique_ptr< uint16_t[]> adcToHostAsync (cudaStream_t stream) const
 
int32_t * clus ()
 
const int32_t * clus () const
 
cms::cuda::host::unique_ptr< int32_t[]> clusToHostAsync (cudaStream_t stream) const
 
uint16_t * moduleInd ()
 
const uint16_t * moduleInd () const
 
uint32_t nDigis () const
 
uint32_t nModules () const
 
SiPixelDigisCUDAoperator= (const SiPixelDigisCUDA &)=delete
 
SiPixelDigisCUDAoperator= (SiPixelDigisCUDA &&)=default
 
uint32_t * pdigi ()
 
const uint32_t * pdigi () const
 
cms::cuda::host::unique_ptr< uint32_t[]> pdigiToHostAsync (cudaStream_t stream) const
 
uint32_t * rawIdArr ()
 
const uint32_t * rawIdArr () const
 
cms::cuda::host::unique_ptr< uint32_t[]> rawIdArrToHostAsync (cudaStream_t stream) const
 
void setNModulesDigis (uint32_t nModules, uint32_t nDigis)
 
 SiPixelDigisCUDA ()=default
 
 SiPixelDigisCUDA (const SiPixelDigisCUDA &)=delete
 
 SiPixelDigisCUDA (SiPixelDigisCUDA &&)=default
 
 SiPixelDigisCUDA (size_t maxFedWords, cudaStream_t stream)
 
const DeviceConstViewview () const
 
uint16_t * xx ()
 
const uint16_t * xx () const
 
uint16_t * yy ()
 
const uint16_t * yy () const
 
 ~SiPixelDigisCUDA ()=default
 

Private Attributes

cms::cuda::device::unique_ptr< uint16_t[]> adc_d
 
cms::cuda::device::unique_ptr< int32_t[]> clus_d
 
cms::cuda::device::unique_ptr< uint16_t[]> moduleInd_d
 
uint32_t nDigis_h = 0
 
uint32_t nModules_h = 0
 
cms::cuda::device::unique_ptr< uint32_t[]> pdigi_d
 
cms::cuda::device::unique_ptr< uint32_t[]> rawIdArr_d
 
cms::cuda::device::unique_ptr< DeviceConstViewview_d
 
cms::cuda::device::unique_ptr< uint16_t[]> xx_d
 
cms::cuda::device::unique_ptr< uint16_t[]> yy_d
 

Detailed Description

Definition at line 10 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 6 of file SiPixelDigisCUDA.cc.

7  : xx_d(cms::cuda::make_device_unique<uint16_t[]>(maxFedWords, stream)),
8  yy_d(cms::cuda::make_device_unique<uint16_t[]>(maxFedWords, stream)),
9  adc_d(cms::cuda::make_device_unique<uint16_t[]>(maxFedWords, stream)),
10  moduleInd_d(cms::cuda::make_device_unique<uint16_t[]>(maxFedWords, stream)),
11  clus_d(cms::cuda::make_device_unique<int32_t[]>(maxFedWords, stream)),
12  view_d(cms::cuda::make_device_unique<DeviceConstView>(stream)),
13  pdigi_d(cms::cuda::make_device_unique<uint32_t[]>(maxFedWords, stream)),
14  rawIdArr_d(cms::cuda::make_device_unique<uint32_t[]>(maxFedWords, stream)) {
15  auto view = cms::cuda::make_host_unique<DeviceConstView>(stream);
16  view->xx_ = xx_d.get();
17  view->yy_ = yy_d.get();
18  view->adc_ = adc_d.get();
19  view->moduleInd_ = moduleInd_d.get();
20  view->clus_ = clus_d.get();
22 }

References SiPixelDigisCUDA::DeviceConstView::adc_, adc_d, SiPixelDigisCUDA::DeviceConstView::clus_, clus_d, cms::cuda::copyAsync(), SiPixelDigisCUDA::DeviceConstView::moduleInd_, moduleInd_d, cms::cuda::stream, view(), view_d, SiPixelDigisCUDA::DeviceConstView::xx_, xx_d, SiPixelDigisCUDA::DeviceConstView::yy_, and yy_d.

◆ ~SiPixelDigisCUDA()

SiPixelDigisCUDA::~SiPixelDigisCUDA ( )
default

◆ SiPixelDigisCUDA() [3/4]

SiPixelDigisCUDA::SiPixelDigisCUDA ( const SiPixelDigisCUDA )
delete

◆ SiPixelDigisCUDA() [4/4]

SiPixelDigisCUDA::SiPixelDigisCUDA ( SiPixelDigisCUDA &&  )
default

Member Function Documentation

◆ adc() [1/2]

uint16_t* SiPixelDigisCUDA::adc ( )
inline

Definition at line 31 of file SiPixelDigisCUDA.h.

31 { return adc_d.get(); }

References adc_d.

◆ adc() [2/2]

const uint16_t* SiPixelDigisCUDA::adc ( ) const
inline

Definition at line 39 of file SiPixelDigisCUDA.h.

39 { return adc_d.get(); }

References adc_d.

◆ adcToHostAsync()

cms::cuda::host::unique_ptr< uint16_t[]> SiPixelDigisCUDA::adcToHostAsync ( cudaStream_t  stream) const

Definition at line 24 of file SiPixelDigisCUDA.cc.

24  {
25  auto ret = cms::cuda::make_host_unique<uint16_t[]>(nDigis(), stream);
27  return ret;
28 }

References adc_d, cms::cuda::copyAsync(), nDigis(), runTheMatrix::ret, and cms::cuda::stream.

◆ clus() [1/2]

int32_t* SiPixelDigisCUDA::clus ( )
inline

Definition at line 33 of file SiPixelDigisCUDA.h.

33 { return clus_d.get(); }

References clus_d.

◆ clus() [2/2]

const int32_t* SiPixelDigisCUDA::clus ( ) const
inline

Definition at line 41 of file SiPixelDigisCUDA.h.

41 { return clus_d.get(); }

References clus_d.

◆ clusToHostAsync()

cms::cuda::host::unique_ptr< int32_t[]> SiPixelDigisCUDA::clusToHostAsync ( cudaStream_t  stream) const

Definition at line 30 of file SiPixelDigisCUDA.cc.

30  {
31  auto ret = cms::cuda::make_host_unique<int32_t[]>(nDigis(), stream);
33  return ret;
34 }

References clus_d, cms::cuda::copyAsync(), nDigis(), runTheMatrix::ret, and cms::cuda::stream.

◆ moduleInd() [1/2]

uint16_t* SiPixelDigisCUDA::moduleInd ( )
inline

Definition at line 32 of file SiPixelDigisCUDA.h.

32 { return moduleInd_d.get(); }

References moduleInd_d.

◆ moduleInd() [2/2]

const uint16_t* SiPixelDigisCUDA::moduleInd ( ) const
inline

Definition at line 40 of file SiPixelDigisCUDA.h.

40 { return moduleInd_d.get(); }

References moduleInd_d.

◆ nDigis()

uint32_t SiPixelDigisCUDA::nDigis ( ) const
inline

Definition at line 27 of file SiPixelDigisCUDA.h.

27 { return nDigis_h; }

References nDigis_h.

Referenced by adcToHostAsync(), clusToHostAsync(), pdigiToHostAsync(), rawIdArrToHostAsync(), and setNModulesDigis().

◆ nModules()

uint32_t SiPixelDigisCUDA::nModules ( ) const
inline

Definition at line 26 of file SiPixelDigisCUDA.h.

26 { return nModules_h; }

References nModules_h.

Referenced by setNModulesDigis().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ pdigi() [1/2]

uint32_t* SiPixelDigisCUDA::pdigi ( )
inline

Definition at line 34 of file SiPixelDigisCUDA.h.

34 { return pdigi_d.get(); }

References pdigi_d.

◆ pdigi() [2/2]

const uint32_t* SiPixelDigisCUDA::pdigi ( ) const
inline

Definition at line 42 of file SiPixelDigisCUDA.h.

42 { return pdigi_d.get(); }

References pdigi_d.

◆ pdigiToHostAsync()

cms::cuda::host::unique_ptr< uint32_t[]> SiPixelDigisCUDA::pdigiToHostAsync ( cudaStream_t  stream) const

Definition at line 36 of file SiPixelDigisCUDA.cc.

36  {
37  auto ret = cms::cuda::make_host_unique<uint32_t[]>(nDigis(), stream);
39  return ret;
40 }

References cms::cuda::copyAsync(), nDigis(), pdigi_d, runTheMatrix::ret, and cms::cuda::stream.

◆ rawIdArr() [1/2]

uint32_t* SiPixelDigisCUDA::rawIdArr ( )
inline

Definition at line 35 of file SiPixelDigisCUDA.h.

35 { return rawIdArr_d.get(); }

References rawIdArr_d.

◆ rawIdArr() [2/2]

const uint32_t* SiPixelDigisCUDA::rawIdArr ( ) const
inline

Definition at line 43 of file SiPixelDigisCUDA.h.

43 { return rawIdArr_d.get(); }

References rawIdArr_d.

◆ rawIdArrToHostAsync()

cms::cuda::host::unique_ptr< uint32_t[]> SiPixelDigisCUDA::rawIdArrToHostAsync ( cudaStream_t  stream) const

Definition at line 42 of file SiPixelDigisCUDA.cc.

42  {
43  auto ret = cms::cuda::make_host_unique<uint32_t[]>(nDigis(), stream);
45  return ret;
46 }

References cms::cuda::copyAsync(), nDigis(), rawIdArr_d, runTheMatrix::ret, and cms::cuda::stream.

◆ setNModulesDigis()

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

Definition at line 21 of file SiPixelDigisCUDA.h.

21  {
23  nDigis_h = nDigis;
24  }

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

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

◆ view()

const DeviceConstView* SiPixelDigisCUDA::view ( ) const
inline

Definition at line 65 of file SiPixelDigisCUDA.h.

65 { return view_d.get(); }

References view_d.

Referenced by SiPixelDigisCUDA().

◆ xx() [1/2]

uint16_t* SiPixelDigisCUDA::xx ( )
inline

Definition at line 29 of file SiPixelDigisCUDA.h.

29 { return xx_d.get(); }

References xx_d.

Referenced by geometryXMLparser.Alignable::covariance().

◆ xx() [2/2]

const uint16_t* SiPixelDigisCUDA::xx ( ) const
inline

Definition at line 37 of file SiPixelDigisCUDA.h.

37 { return xx_d.get(); }

References xx_d.

Referenced by geometryXMLparser.Alignable::covariance().

◆ yy() [1/2]

uint16_t* SiPixelDigisCUDA::yy ( )
inline

Definition at line 30 of file SiPixelDigisCUDA.h.

30 { return yy_d.get(); }

References yy_d.

Referenced by geometryXMLparser.Alignable::covariance().

◆ yy() [2/2]

const uint16_t* SiPixelDigisCUDA::yy ( ) const
inline

Definition at line 38 of file SiPixelDigisCUDA.h.

38 { return yy_d.get(); }

References yy_d.

Referenced by geometryXMLparser.Alignable::covariance().

Member Data Documentation

◆ adc_d

cms::cuda::device::unique_ptr<uint16_t[]> SiPixelDigisCUDA::adc_d
private

Definition at line 71 of file SiPixelDigisCUDA.h.

Referenced by adc(), adcToHostAsync(), and SiPixelDigisCUDA().

◆ clus_d

cms::cuda::device::unique_ptr<int32_t[]> SiPixelDigisCUDA::clus_d
private

Definition at line 73 of file SiPixelDigisCUDA.h.

Referenced by clus(), clusToHostAsync(), and SiPixelDigisCUDA().

◆ moduleInd_d

cms::cuda::device::unique_ptr<uint16_t[]> SiPixelDigisCUDA::moduleInd_d
private

Definition at line 72 of file SiPixelDigisCUDA.h.

Referenced by moduleInd(), and SiPixelDigisCUDA().

◆ nDigis_h

uint32_t SiPixelDigisCUDA::nDigis_h = 0
private

Definition at line 82 of file SiPixelDigisCUDA.h.

Referenced by nDigis(), and setNModulesDigis().

◆ nModules_h

uint32_t SiPixelDigisCUDA::nModules_h = 0
private

Definition at line 81 of file SiPixelDigisCUDA.h.

Referenced by nModules(), and setNModulesDigis().

◆ pdigi_d

cms::cuda::device::unique_ptr<uint32_t[]> SiPixelDigisCUDA::pdigi_d
private

Definition at line 78 of file SiPixelDigisCUDA.h.

Referenced by pdigi(), and pdigiToHostAsync().

◆ rawIdArr_d

cms::cuda::device::unique_ptr<uint32_t[]> SiPixelDigisCUDA::rawIdArr_d
private

Definition at line 79 of file SiPixelDigisCUDA.h.

Referenced by rawIdArr(), and rawIdArrToHostAsync().

◆ view_d

cms::cuda::device::unique_ptr<DeviceConstView> SiPixelDigisCUDA::view_d
private

Definition at line 74 of file SiPixelDigisCUDA.h.

Referenced by SiPixelDigisCUDA(), and view().

◆ xx_d

cms::cuda::device::unique_ptr<uint16_t[]> SiPixelDigisCUDA::xx_d
private

Definition at line 69 of file SiPixelDigisCUDA.h.

Referenced by SiPixelDigisCUDA(), and xx().

◆ yy_d

cms::cuda::device::unique_ptr<uint16_t[]> SiPixelDigisCUDA::yy_d
private

Definition at line 70 of file SiPixelDigisCUDA.h.

Referenced by SiPixelDigisCUDA(), and yy().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
SiPixelDigisCUDA::rawIdArr_d
cms::cuda::device::unique_ptr< uint32_t[]> rawIdArr_d
Definition: SiPixelDigisCUDA.h:79
SiPixelDigisCUDA::adc_d
cms::cuda::device::unique_ptr< uint16_t[]> adc_d
Definition: SiPixelDigisCUDA.h:71
cms::cuda::make_device_unique
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)
Definition: device_unique_ptr.h:52
SiPixelDigisCUDA::nModules_h
uint32_t nModules_h
Definition: SiPixelDigisCUDA.h:81
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
SiPixelDigisCUDA::nDigis_h
uint32_t nDigis_h
Definition: SiPixelDigisCUDA.h:82
SiPixelDigisCUDA::pdigi_d
cms::cuda::device::unique_ptr< uint32_t[]> pdigi_d
Definition: SiPixelDigisCUDA.h:78
SiPixelDigisCUDA::view_d
cms::cuda::device::unique_ptr< DeviceConstView > view_d
Definition: SiPixelDigisCUDA.h:74
SiPixelDigisCUDA::DeviceConstView::xx_
const uint16_t * xx_
Definition: SiPixelDigisCUDA.h:58
SiPixelDigisCUDA::nDigis
uint32_t nDigis() const
Definition: SiPixelDigisCUDA.h:27
SiPixelDigisCUDA::DeviceConstView::moduleInd_
const uint16_t * moduleInd_
Definition: SiPixelDigisCUDA.h:61
SiPixelDigisCUDA::DeviceConstView::yy_
const uint16_t * yy_
Definition: SiPixelDigisCUDA.h:59
SiPixelDigisCUDA::moduleInd_d
cms::cuda::device::unique_ptr< uint16_t[]> moduleInd_d
Definition: SiPixelDigisCUDA.h:72
SiPixelDigisCUDA::DeviceConstView::clus_
const int32_t * clus_
Definition: SiPixelDigisCUDA.h:62
SiPixelDigisCUDA::nModules
uint32_t nModules() const
Definition: SiPixelDigisCUDA.h:26
SiPixelDigisCUDA::yy_d
cms::cuda::device::unique_ptr< uint16_t[]> yy_d
Definition: SiPixelDigisCUDA.h:70
SiPixelDigisCUDA::xx_d
cms::cuda::device::unique_ptr< uint16_t[]> xx_d
Definition: SiPixelDigisCUDA.h:69
SiPixelDigisCUDA::clus_d
cms::cuda::device::unique_ptr< int32_t[]> clus_d
Definition: SiPixelDigisCUDA.h:73
SiPixelDigisCUDA::view
const DeviceConstView * view() const
Definition: SiPixelDigisCUDA.h:65
SiPixelDigisCUDA::DeviceConstView::adc_
const uint16_t * adc_
Definition: SiPixelDigisCUDA.h:60
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20