CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
SiPixelDigisCUDASOAView Class Reference

#include <SiPixelDigisCUDASOAView.h>

Public Types

enum  StorageLocation {
  StorageLocation::kCLUS = 0, StorageLocation::kPDIGI = 2, StorageLocation::kRAWIDARR = 4, StorageLocation::kADC = 6,
  StorageLocation::kXX = 7, StorageLocation::kYY = 8, StorageLocation::kMODULEIND = 9, StorageLocation::kMAX = 10
}
 
enum  StorageLocationHost {
  StorageLocationHost::kCLUS = 0, StorageLocationHost::kPDIGI = 2, StorageLocationHost::kRAWIDARR = 4, StorageLocationHost::kADC = 6,
  StorageLocationHost::kMAX = 7
}
 

Public Member Functions

__device__ __attribute__ ((always_inline)) uint16_t xx(int i) const
 
__device__ __attribute__ ((always_inline)) uint16_t yy(int i) const
 
__device__ __attribute__ ((always_inline)) uint16_t adc(int i) const
 
__device__ __attribute__ ((always_inline)) uint16_t moduleInd(int i) const
 
__device__ __attribute__ ((always_inline)) int32_t clus(int i) const
 
__device__ __attribute__ ((always_inline)) uint32_t pdigi(int i) const
 
__device__ __attribute__ ((always_inline)) uint32_t rawIdArr(int i) const
 
const uint16_t * adc () const
 
uint16_t * adc ()
 
const int32_t * clus () const
 
int32_t * clus ()
 
const uint16_t * moduleInd () const
 
uint16_t * moduleInd ()
 
const uint32_t * pdigi () const
 
uint32_t * pdigi ()
 
const uint32_t * rawIdArr () const
 
uint32_t * rawIdArr ()
 
 SiPixelDigisCUDASOAView ()=default
 
template<typename StoreType >
 SiPixelDigisCUDASOAView (StoreType &store, int maxFedWords, StorageLocation s)
 
template<typename StoreType >
 SiPixelDigisCUDASOAView (StoreType &store, int maxFedWords, StorageLocationHost s)
 
const uint16_t * xx () const
 
uint16_t * xx ()
 
const uint16_t * yy () const
 
uint16_t * yy ()
 

Private Member Functions

template<typename ReturnType , typename StoreType , typename LocationType >
ReturnType * getColumnAddress (LocationType column, StoreType &store, int size)
 

Static Private Member Functions

static int roundFor128ByteAlignment (int size)
 

Private Attributes

uint16_t * adc_
 
int32_t * clus_
 
uint16_t * moduleInd_
 
uint32_t * pdigi_
 
uint32_t * rawIdArr_
 
uint16_t * xx_
 
uint16_t * yy_
 

Friends

class SiPixelDigisCUDA
 
class SiPixelRecHitSoAFromLegacy
 

Detailed Description

Definition at line 12 of file SiPixelDigisCUDASOAView.h.

Member Enumeration Documentation

◆ StorageLocation

Enumerator
kCLUS 
kPDIGI 
kRAWIDARR 
kADC 
kXX 
kYY 
kMODULEIND 
kMAX 

Definition at line 16 of file SiPixelDigisCUDASOAView.h.

16  {
17  kCLUS = 0,
18  kPDIGI = 2,
19  kRAWIDARR = 4,
20  kADC = 6,
21  kXX = 7,
22  kYY = 8,
23  kMODULEIND = 9,
24  kMAX = 10
25  };

◆ StorageLocationHost

Enumerator
kCLUS 
kPDIGI 
kRAWIDARR 
kADC 
kMAX 

Definition at line 35 of file SiPixelDigisCUDASOAView.h.

35 { kCLUS = 0, kPDIGI = 2, kRAWIDARR = 4, kADC = 6, kMAX = 7 };

Constructor & Destructor Documentation

◆ SiPixelDigisCUDASOAView() [1/3]

SiPixelDigisCUDASOAView::SiPixelDigisCUDASOAView ( )
default

◆ SiPixelDigisCUDASOAView() [2/3]

template<typename StoreType >
SiPixelDigisCUDASOAView::SiPixelDigisCUDASOAView ( StoreType &  store,
int  maxFedWords,
StorageLocation  s 
)
inline

Definition at line 47 of file SiPixelDigisCUDASOAView.h.

References adc_, clus_, kADC, kCLUS, kMODULEIND, kPDIGI, kRAWIDARR, kXX, kYY, moduleInd_, pdigi_, rawIdArr_, xx_, and yy_.

47  {
48  xx_ = getColumnAddress<uint16_t>(StorageLocation::kXX, store, maxFedWords);
49  yy_ = getColumnAddress<uint16_t>(StorageLocation::kYY, store, maxFedWords);
50  adc_ = getColumnAddress<uint16_t>(StorageLocation::kADC, store, maxFedWords);
51  moduleInd_ = getColumnAddress<uint16_t>(StorageLocation::kMODULEIND, store, maxFedWords);
52  clus_ = getColumnAddress<int32_t>(StorageLocation::kCLUS, store, maxFedWords);
53  pdigi_ = getColumnAddress<uint32_t>(StorageLocation::kPDIGI, store, maxFedWords);
54  rawIdArr_ = getColumnAddress<uint32_t>(StorageLocation::kRAWIDARR, store, maxFedWords);
55  }

◆ SiPixelDigisCUDASOAView() [3/3]

template<typename StoreType >
SiPixelDigisCUDASOAView::SiPixelDigisCUDASOAView ( StoreType &  store,
int  maxFedWords,
StorageLocationHost  s 
)
inline

Member Function Documentation

◆ __attribute__() [1/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 65 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), mps_fire::i, and xx_.

65 { return __ldg(xx_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ __attribute__() [2/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 66 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), mps_fire::i, and yy_.

66 { return __ldg(yy_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ __attribute__() [3/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 67 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), adc_, and mps_fire::i.

67 { return __ldg(adc_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ __attribute__() [4/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 68 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), mps_fire::i, and moduleInd_.

68 { return __ldg(moduleInd_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ __attribute__() [5/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 69 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), clus_, and mps_fire::i.

69 { return __ldg(clus_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ __attribute__() [6/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 70 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), mps_fire::i, and pdigi_.

70 { return __ldg(pdigi_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ __attribute__() [7/7]

__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 71 of file SiPixelDigisCUDASOAView.h.

References cms::cudacompat::__ldg(), mps_fire::i, and rawIdArr_.

71 { return __ldg(rawIdArr_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:137

◆ adc() [1/2]

const uint16_t* SiPixelDigisCUDASOAView::adc ( ) const
inline

Definition at line 75 of file SiPixelDigisCUDASOAView.h.

References adc_.

Referenced by gpuPixelRecHits::__attribute__(), and SiPixelRecHitSoAFromLegacy::produce().

75 { return adc_; }

◆ adc() [2/2]

uint16_t* SiPixelDigisCUDASOAView::adc ( )
inline

Definition at line 83 of file SiPixelDigisCUDASOAView.h.

References adc_.

83 { return adc_; }

◆ clus() [1/2]

const int32_t* SiPixelDigisCUDASOAView::clus ( ) const
inline

Definition at line 77 of file SiPixelDigisCUDASOAView.h.

References clus_.

Referenced by gpuPixelRecHits::__attribute__(), and SiPixelDigisCUDA::copyAllToHostAsync().

77 { return clus_; }

◆ clus() [2/2]

int32_t* SiPixelDigisCUDASOAView::clus ( )
inline

Definition at line 85 of file SiPixelDigisCUDASOAView.h.

References clus_.

85 { return clus_; }

◆ getColumnAddress()

template<typename ReturnType , typename StoreType , typename LocationType >
ReturnType* SiPixelDigisCUDASOAView::getColumnAddress ( LocationType  column,
StoreType &  store,
int  size 
)
inlineprivate

Definition at line 99 of file SiPixelDigisCUDASOAView.h.

References roundFor128ByteAlignment(), and findQualityFiles::size.

99  {
100  return reinterpret_cast<ReturnType*>(store.get() + static_cast<int>(column) * roundFor128ByteAlignment(size));
101  }
size
Write out results.
static int roundFor128ByteAlignment(int size)
std::map< DetId, double > ReturnType

◆ moduleInd() [1/2]

const uint16_t* SiPixelDigisCUDASOAView::moduleInd ( ) const
inline

Definition at line 76 of file SiPixelDigisCUDASOAView.h.

References moduleInd_.

Referenced by gpuPixelRecHits::__attribute__().

76 { return moduleInd_; }

◆ moduleInd() [2/2]

uint16_t* SiPixelDigisCUDASOAView::moduleInd ( )
inline

Definition at line 84 of file SiPixelDigisCUDASOAView.h.

References moduleInd_.

84 { return moduleInd_; }

◆ pdigi() [1/2]

const uint32_t* SiPixelDigisCUDASOAView::pdigi ( ) const
inline

Definition at line 78 of file SiPixelDigisCUDASOAView.h.

References pdigi_.

78 { return pdigi_; }

◆ pdigi() [2/2]

uint32_t* SiPixelDigisCUDASOAView::pdigi ( )
inline

Definition at line 86 of file SiPixelDigisCUDASOAView.h.

References pdigi_.

86 { return pdigi_; }

◆ rawIdArr() [1/2]

const uint32_t* SiPixelDigisCUDASOAView::rawIdArr ( ) const
inline

Definition at line 79 of file SiPixelDigisCUDASOAView.h.

References rawIdArr_.

79 { return rawIdArr_; }

◆ rawIdArr() [2/2]

uint32_t* SiPixelDigisCUDASOAView::rawIdArr ( )
inline

Definition at line 87 of file SiPixelDigisCUDASOAView.h.

References rawIdArr_.

87 { return rawIdArr_; }

◆ roundFor128ByteAlignment()

static int SiPixelDigisCUDASOAView::roundFor128ByteAlignment ( int  size)
inlinestaticprivate

Definition at line 103 of file SiPixelDigisCUDASOAView.h.

References findQualityFiles::size.

Referenced by SiPixelDigisCUDA::copyAllToHostAsync(), and getColumnAddress().

103  {
104  constexpr int mul = 128 / sizeof(uint16_t);
105  return ((size + mul - 1) / mul) * mul;
106  };
size
Write out results.

◆ xx() [1/2]

const uint16_t* SiPixelDigisCUDASOAView::xx ( ) const
inline

Definition at line 73 of file SiPixelDigisCUDASOAView.h.

References xx_.

Referenced by gpuPixelRecHits::__attribute__(), and geometryXMLparser.Alignable::covariance().

73 { return xx_; }

◆ xx() [2/2]

uint16_t* SiPixelDigisCUDASOAView::xx ( )
inline

Definition at line 81 of file SiPixelDigisCUDASOAView.h.

References xx_.

Referenced by geometryXMLparser.Alignable::covariance().

81 { return xx_; }

◆ yy() [1/2]

const uint16_t* SiPixelDigisCUDASOAView::yy ( ) const
inline

Definition at line 74 of file SiPixelDigisCUDASOAView.h.

References yy_.

Referenced by gpuPixelRecHits::__attribute__(), and geometryXMLparser.Alignable::covariance().

74 { return yy_; }

◆ yy() [2/2]

uint16_t* SiPixelDigisCUDASOAView::yy ( )
inline

Definition at line 82 of file SiPixelDigisCUDASOAView.h.

References yy_.

Referenced by geometryXMLparser.Alignable::covariance().

82 { return yy_; }

Friends And Related Function Documentation

◆ SiPixelDigisCUDA

friend class SiPixelDigisCUDA
friend

Definition at line 14 of file SiPixelDigisCUDASOAView.h.

◆ SiPixelRecHitSoAFromLegacy

friend class SiPixelRecHitSoAFromLegacy
friend

Definition at line 15 of file SiPixelDigisCUDASOAView.h.

Member Data Documentation

◆ adc_

uint16_t* SiPixelDigisCUDASOAView::adc_
private

◆ clus_

int32_t* SiPixelDigisCUDASOAView::clus_
private

◆ moduleInd_

uint16_t* SiPixelDigisCUDASOAView::moduleInd_
private

◆ pdigi_

uint32_t* SiPixelDigisCUDASOAView::pdigi_
private

◆ rawIdArr_

uint32_t* SiPixelDigisCUDASOAView::rawIdArr_
private

◆ xx_

uint16_t* SiPixelDigisCUDASOAView::xx_
private

◆ yy_

uint16_t* SiPixelDigisCUDASOAView::yy_
private