CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ()
 
uint16_t const * adc () const
 
cms::cuda::host::unique_ptr
< uint16_t[]> 
adcToHostAsync (cudaStream_t stream) const
 
int32_t * clus ()
 
int32_t const * clus () const
 
cms::cuda::host::unique_ptr
< int32_t[]> 
clusToHostAsync (cudaStream_t stream) const
 
uint16_t * moduleInd ()
 
uint16_t const * moduleInd () const
 
uint32_t nDigis () const
 
uint32_t nModules () const
 
SiPixelDigisCUDAoperator= (const SiPixelDigisCUDA &)=delete
 
SiPixelDigisCUDAoperator= (SiPixelDigisCUDA &&)=default
 
uint32_t * pdigi ()
 
uint32_t const * pdigi () const
 
cms::cuda::host::unique_ptr
< uint32_t[]> 
pdigiToHostAsync (cudaStream_t stream) const
 
uint32_t * rawIdArr ()
 
uint32_t const * 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 (size_t maxFedWords, cudaStream_t stream)
 
 SiPixelDigisCUDA (const SiPixelDigisCUDA &)=delete
 
 SiPixelDigisCUDA (SiPixelDigisCUDA &&)=default
 
const DeviceConstViewview () const
 
uint16_t * xx ()
 
uint16_t const * xx () const
 
uint16_t * yy ()
 
uint16_t const * 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
< DeviceConstView
view_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::SiPixelDigisCUDA ( )
default
SiPixelDigisCUDA::SiPixelDigisCUDA ( size_t  maxFedWords,
cudaStream_t  stream 
)
explicit

Definition at line 6 of file SiPixelDigisCUDA.cc.

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.

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 }
cms::cuda::device::unique_ptr< uint16_t[]> xx_d
cms::cuda::device::unique_ptr< uint16_t[]> moduleInd_d
cms::cuda::device::unique_ptr< int32_t[]> clus_d
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
cms::cuda::device::unique_ptr< uint16_t[]> yy_d
cms::cuda::device::unique_ptr< uint16_t[]> adc_d
const DeviceConstView * view() const
cms::cuda::device::unique_ptr< uint32_t[]> rawIdArr_d
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
cms::cuda::device::unique_ptr< uint32_t[]> pdigi_d
cms::cuda::device::unique_ptr< DeviceConstView > view_d
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)
SiPixelDigisCUDA::~SiPixelDigisCUDA ( )
default
SiPixelDigisCUDA::SiPixelDigisCUDA ( const SiPixelDigisCUDA )
delete
SiPixelDigisCUDA::SiPixelDigisCUDA ( SiPixelDigisCUDA &&  )
default

Member Function Documentation

uint16_t* SiPixelDigisCUDA::adc ( )
inline

Definition at line 31 of file SiPixelDigisCUDA.h.

References adc_d.

31 { return adc_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> adc_d
uint16_t const* SiPixelDigisCUDA::adc ( ) const
inline

Definition at line 39 of file SiPixelDigisCUDA.h.

References adc_d.

39 { return adc_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> adc_d
cms::cuda::host::unique_ptr< uint16_t[]> SiPixelDigisCUDA::adcToHostAsync ( cudaStream_t  stream) const

Definition at line 24 of file SiPixelDigisCUDA.cc.

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

24  {
25  auto ret = cms::cuda::make_host_unique<uint16_t[]>(nDigis(), stream);
27  return ret;
28 }
tuple ret
prodAgent to be discontinued
uint32_t nDigis() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
cms::cuda::device::unique_ptr< uint16_t[]> adc_d
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
int32_t* SiPixelDigisCUDA::clus ( )
inline

Definition at line 33 of file SiPixelDigisCUDA.h.

References clus_d.

33 { return clus_d.get(); }
cms::cuda::device::unique_ptr< int32_t[]> clus_d
int32_t const* SiPixelDigisCUDA::clus ( ) const
inline

Definition at line 41 of file SiPixelDigisCUDA.h.

References clus_d.

41 { return clus_d.get(); }
cms::cuda::device::unique_ptr< int32_t[]> clus_d
cms::cuda::host::unique_ptr< int32_t[]> SiPixelDigisCUDA::clusToHostAsync ( cudaStream_t  stream) const

Definition at line 30 of file SiPixelDigisCUDA.cc.

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

30  {
31  auto ret = cms::cuda::make_host_unique<int32_t[]>(nDigis(), stream);
33  return ret;
34 }
tuple ret
prodAgent to be discontinued
uint32_t nDigis() const
cms::cuda::device::unique_ptr< int32_t[]> clus_d
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
uint16_t* SiPixelDigisCUDA::moduleInd ( )
inline

Definition at line 32 of file SiPixelDigisCUDA.h.

References moduleInd_d.

32 { return moduleInd_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> moduleInd_d
uint16_t const* SiPixelDigisCUDA::moduleInd ( ) const
inline

Definition at line 40 of file SiPixelDigisCUDA.h.

References moduleInd_d.

40 { return moduleInd_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> moduleInd_d
uint32_t SiPixelDigisCUDA::nDigis ( ) const
inline

Definition at line 27 of file SiPixelDigisCUDA.h.

References nDigis_h.

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

27 { return nDigis_h; }
uint32_t SiPixelDigisCUDA::nModules ( ) const
inline

Definition at line 26 of file SiPixelDigisCUDA.h.

References nModules_h.

Referenced by setNModulesDigis().

26 { return nModules_h; }
SiPixelDigisCUDA& SiPixelDigisCUDA::operator= ( const SiPixelDigisCUDA )
delete
SiPixelDigisCUDA& SiPixelDigisCUDA::operator= ( SiPixelDigisCUDA &&  )
default
uint32_t* SiPixelDigisCUDA::pdigi ( )
inline

Definition at line 34 of file SiPixelDigisCUDA.h.

References pdigi_d.

34 { return pdigi_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> pdigi_d
uint32_t const* SiPixelDigisCUDA::pdigi ( ) const
inline

Definition at line 42 of file SiPixelDigisCUDA.h.

References pdigi_d.

42 { return pdigi_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> pdigi_d
cms::cuda::host::unique_ptr< uint32_t[]> SiPixelDigisCUDA::pdigiToHostAsync ( cudaStream_t  stream) const

Definition at line 36 of file SiPixelDigisCUDA.cc.

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

36  {
37  auto ret = cms::cuda::make_host_unique<uint32_t[]>(nDigis(), stream);
39  return ret;
40 }
tuple ret
prodAgent to be discontinued
uint32_t nDigis() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
cms::cuda::device::unique_ptr< uint32_t[]> pdigi_d
uint32_t* SiPixelDigisCUDA::rawIdArr ( )
inline

Definition at line 35 of file SiPixelDigisCUDA.h.

References rawIdArr_d.

35 { return rawIdArr_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> rawIdArr_d
uint32_t const* SiPixelDigisCUDA::rawIdArr ( ) const
inline

Definition at line 43 of file SiPixelDigisCUDA.h.

References rawIdArr_d.

43 { return rawIdArr_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> rawIdArr_d
cms::cuda::host::unique_ptr< uint32_t[]> SiPixelDigisCUDA::rawIdArrToHostAsync ( cudaStream_t  stream) const

Definition at line 42 of file SiPixelDigisCUDA.cc.

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

42  {
43  auto ret = cms::cuda::make_host_unique<uint32_t[]>(nDigis(), stream);
45  return ret;
46 }
tuple ret
prodAgent to be discontinued
uint32_t nDigis() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
cms::cuda::device::unique_ptr< uint32_t[]> rawIdArr_d
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
void SiPixelDigisCUDA::setNModulesDigis ( uint32_t  nModules,
uint32_t  nDigis 
)
inline

Definition at line 21 of file SiPixelDigisCUDA.h.

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

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

21  {
23  nDigis_h = nDigis;
24  }
uint32_t nDigis() const
uint32_t nModules() const
const DeviceConstView* SiPixelDigisCUDA::view ( ) const
inline

Definition at line 65 of file SiPixelDigisCUDA.h.

References view_d.

Referenced by SiPixelDigisCUDA().

65 { return view_d.get(); }
cms::cuda::device::unique_ptr< DeviceConstView > view_d
uint16_t* SiPixelDigisCUDA::xx ( )
inline

Definition at line 29 of file SiPixelDigisCUDA.h.

References xx_d.

Referenced by geometryXMLparser.Alignable::covariance().

29 { return xx_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> xx_d
uint16_t const* SiPixelDigisCUDA::xx ( ) const
inline

Definition at line 37 of file SiPixelDigisCUDA.h.

References xx_d.

Referenced by geometryXMLparser.Alignable::covariance().

37 { return xx_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> xx_d
uint16_t* SiPixelDigisCUDA::yy ( )
inline

Definition at line 30 of file SiPixelDigisCUDA.h.

References yy_d.

Referenced by geometryXMLparser.Alignable::covariance().

30 { return yy_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> yy_d
uint16_t const* SiPixelDigisCUDA::yy ( ) const
inline

Definition at line 38 of file SiPixelDigisCUDA.h.

References yy_d.

Referenced by geometryXMLparser.Alignable::covariance().

38 { return yy_d.get(); }
cms::cuda::device::unique_ptr< uint16_t[]> yy_d

Member Data Documentation

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().

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().

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

Definition at line 72 of file SiPixelDigisCUDA.h.

Referenced by moduleInd(), and SiPixelDigisCUDA().

uint32_t SiPixelDigisCUDA::nDigis_h = 0
private

Definition at line 82 of file SiPixelDigisCUDA.h.

Referenced by nDigis(), and setNModulesDigis().

uint32_t SiPixelDigisCUDA::nModules_h = 0
private

Definition at line 81 of file SiPixelDigisCUDA.h.

Referenced by nModules(), and setNModulesDigis().

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

Definition at line 78 of file SiPixelDigisCUDA.h.

Referenced by pdigi(), and pdigiToHostAsync().

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

Definition at line 79 of file SiPixelDigisCUDA.h.

Referenced by rawIdArr(), and rawIdArrToHostAsync().

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

Definition at line 74 of file SiPixelDigisCUDA.h.

Referenced by SiPixelDigisCUDA(), and view().

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

Definition at line 69 of file SiPixelDigisCUDA.h.

Referenced by SiPixelDigisCUDA(), and xx().

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

Definition at line 70 of file SiPixelDigisCUDA.h.

Referenced by SiPixelDigisCUDA(), and yy().