CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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  };
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::SiPixelDigisCUDASOAView ( )
default
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  }
template<typename StoreType >
SiPixelDigisCUDASOAView::SiPixelDigisCUDASOAView ( StoreType &  store,
int  maxFedWords,
StorageLocationHost  s 
)
inline

Member Function Documentation

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

Definition at line 65 of file SiPixelDigisCUDASOAView.h.

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

65 { return __ldg(xx_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 66 of file SiPixelDigisCUDASOAView.h.

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

66 { return __ldg(yy_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 67 of file SiPixelDigisCUDASOAView.h.

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

67 { return __ldg(adc_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 68 of file SiPixelDigisCUDASOAView.h.

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

68 { return __ldg(moduleInd_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 69 of file SiPixelDigisCUDASOAView.h.

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

69 { return __ldg(clus_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 70 of file SiPixelDigisCUDASOAView.h.

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

70 { return __ldg(pdigi_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
__device__ SiPixelDigisCUDASOAView::__attribute__ ( (always_inline)  ) const
inline

Definition at line 71 of file SiPixelDigisCUDASOAView.h.

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

71 { return __ldg(rawIdArr_ + i); }
T __ldg(T const *x)
Definition: cudaCompat.h:113
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_; }
uint16_t* SiPixelDigisCUDASOAView::adc ( )
inline

Definition at line 83 of file SiPixelDigisCUDASOAView.h.

References adc_.

83 { return adc_; }
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_; }
int32_t* SiPixelDigisCUDASOAView::clus ( )
inline

Definition at line 85 of file SiPixelDigisCUDASOAView.h.

References clus_.

85 { return clus_; }
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().

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

Definition at line 76 of file SiPixelDigisCUDASOAView.h.

References moduleInd_.

Referenced by gpuPixelRecHits::__attribute__().

76 { return moduleInd_; }
uint16_t* SiPixelDigisCUDASOAView::moduleInd ( )
inline

Definition at line 84 of file SiPixelDigisCUDASOAView.h.

References moduleInd_.

84 { return moduleInd_; }
const uint32_t* SiPixelDigisCUDASOAView::pdigi ( ) const
inline

Definition at line 78 of file SiPixelDigisCUDASOAView.h.

References pdigi_.

78 { return pdigi_; }
uint32_t* SiPixelDigisCUDASOAView::pdigi ( )
inline

Definition at line 86 of file SiPixelDigisCUDASOAView.h.

References pdigi_.

86 { return pdigi_; }
const uint32_t* SiPixelDigisCUDASOAView::rawIdArr ( ) const
inline

Definition at line 79 of file SiPixelDigisCUDASOAView.h.

References rawIdArr_.

79 { return rawIdArr_; }
uint32_t* SiPixelDigisCUDASOAView::rawIdArr ( )
inline

Definition at line 87 of file SiPixelDigisCUDASOAView.h.

References rawIdArr_.

87 { return rawIdArr_; }
static int SiPixelDigisCUDASOAView::roundFor128ByteAlignment ( int  size)
inlinestaticprivate

Definition at line 103 of file SiPixelDigisCUDASOAView.h.

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

103  {
104  constexpr int mul = 128 / sizeof(uint16_t);
105  return ((size + mul - 1) / mul) * mul;
106  };
tuple size
Write out results.
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_; }
uint16_t* SiPixelDigisCUDASOAView::xx ( )
inline

Definition at line 81 of file SiPixelDigisCUDASOAView.h.

References xx_.

Referenced by geometryXMLparser.Alignable::covariance().

81 { return xx_; }
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_; }
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

friend class SiPixelDigisCUDA
friend

Definition at line 14 of file SiPixelDigisCUDASOAView.h.

friend class SiPixelRecHitSoAFromLegacy
friend

Definition at line 15 of file SiPixelDigisCUDASOAView.h.

Member Data Documentation

uint16_t* SiPixelDigisCUDASOAView::adc_
private
int32_t* SiPixelDigisCUDASOAView::clus_
private
uint16_t* SiPixelDigisCUDASOAView::moduleInd_
private
uint32_t* SiPixelDigisCUDASOAView::pdigi_
private
uint32_t* SiPixelDigisCUDASOAView::rawIdArr_
private
uint16_t* SiPixelDigisCUDASOAView::xx_
private
uint16_t* SiPixelDigisCUDASOAView::yy_
private