CMS 3D CMS Logo

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

#include <SiPixelClustersCUDA.h>

Classes

class  SiPixelClustersCUDASOAView
 

Public Member Functions

uint32_t * clusInModule ()
 
uint32_t const * clusInModule () const
 
uint32_t * clusModuleStart ()
 
uint32_t const * clusModuleStart () const
 
uint32_t * moduleId ()
 
uint32_t const * moduleId () const
 
uint32_t * moduleStart ()
 
uint32_t const * moduleStart () const
 
uint32_t nClusters () const
 
int32_t offsetBPIX2 () const
 
SiPixelClustersCUDAoperator= (const SiPixelClustersCUDA &)=delete
 
SiPixelClustersCUDAoperator= (SiPixelClustersCUDA &&)=default
 
void setNClusters (uint32_t nClusters, int32_t offsetBPIX2)
 
 SiPixelClustersCUDA ()=default
 
 SiPixelClustersCUDA (size_t maxModules, cudaStream_t stream)
 
 SiPixelClustersCUDA (const SiPixelClustersCUDA &)=delete
 
 SiPixelClustersCUDA (SiPixelClustersCUDA &&)=default
 
SiPixelClustersCUDASOAView const * view () const
 
 ~SiPixelClustersCUDA ()=default
 

Private Attributes

cms::cuda::device::unique_ptr< uint32_t[]> clusInModule_d
 
cms::cuda::device::unique_ptr< uint32_t[]> clusModuleStart_d
 
cms::cuda::device::unique_ptr< uint32_t[]> moduleId_d
 
cms::cuda::device::unique_ptr< uint32_t[]> moduleStart_d
 
uint32_t nClusters_h = 0
 
int32_t offsetBPIX2_h = 0
 
cms::cuda::device::unique_ptr< SiPixelClustersCUDASOAViewview_d
 

Detailed Description

Definition at line 10 of file SiPixelClustersCUDA.h.

Constructor & Destructor Documentation

◆ SiPixelClustersCUDA() [1/4]

SiPixelClustersCUDA::SiPixelClustersCUDA ( )
default

◆ SiPixelClustersCUDA() [2/4]

SiPixelClustersCUDA::SiPixelClustersCUDA ( size_t  maxModules,
cudaStream_t  stream 
)
explicit

Definition at line 6 of file SiPixelClustersCUDA.cc.

References SiPixelClustersCUDA::SiPixelClustersCUDASOAView::clusInModule_, clusInModule_d, SiPixelClustersCUDA::SiPixelClustersCUDASOAView::clusModuleStart_, clusModuleStart_d, cms::cuda::copyAsync(), SiPixelClustersCUDA::SiPixelClustersCUDASOAView::moduleId_, moduleId_d, SiPixelClustersCUDA::SiPixelClustersCUDASOAView::moduleStart_, moduleStart_d, cms::cuda::stream, view(), and view_d.

7  : moduleStart_d(cms::cuda::make_device_unique<uint32_t[]>(maxModules + 1, stream)),
8  clusInModule_d(cms::cuda::make_device_unique<uint32_t[]>(maxModules, stream)),
9  moduleId_d(cms::cuda::make_device_unique<uint32_t[]>(maxModules, stream)),
10  clusModuleStart_d(cms::cuda::make_device_unique<uint32_t[]>(maxModules + 1, stream)) {
11  auto view = cms::cuda::make_host_unique<SiPixelClustersCUDASOAView>(stream);
14  view->moduleId_ = moduleId_d.get();
16 
17  view_d = cms::cuda::make_device_unique<SiPixelClustersCUDASOAView>(stream);
19 }
cms::cuda::device::unique_ptr< uint32_t[]> moduleStart_d
cms::cuda::device::unique_ptr< SiPixelClustersCUDASOAView > view_d
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[]> moduleId_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[]> clusInModule_d
cms::cuda::device::unique_ptr< uint32_t[]> clusModuleStart_d
SiPixelClustersCUDASOAView const * view() const
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)

◆ ~SiPixelClustersCUDA()

SiPixelClustersCUDA::~SiPixelClustersCUDA ( )
default

◆ SiPixelClustersCUDA() [3/4]

SiPixelClustersCUDA::SiPixelClustersCUDA ( const SiPixelClustersCUDA )
delete

◆ SiPixelClustersCUDA() [4/4]

SiPixelClustersCUDA::SiPixelClustersCUDA ( SiPixelClustersCUDA &&  )
default

Member Function Documentation

◆ clusInModule() [1/2]

uint32_t* SiPixelClustersCUDA::clusInModule ( )
inline

Definition at line 30 of file SiPixelClustersCUDA.h.

References clusInModule_d.

30 { return clusInModule_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> clusInModule_d

◆ clusInModule() [2/2]

uint32_t const* SiPixelClustersCUDA::clusInModule ( ) const
inline

Definition at line 35 of file SiPixelClustersCUDA.h.

References clusInModule_d.

35 { return clusInModule_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> clusInModule_d

◆ clusModuleStart() [1/2]

uint32_t* SiPixelClustersCUDA::clusModuleStart ( )
inline

Definition at line 32 of file SiPixelClustersCUDA.h.

References clusModuleStart_d.

32 { return clusModuleStart_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> clusModuleStart_d

◆ clusModuleStart() [2/2]

uint32_t const* SiPixelClustersCUDA::clusModuleStart ( ) const
inline

Definition at line 37 of file SiPixelClustersCUDA.h.

References clusModuleStart_d.

37 { return clusModuleStart_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> clusModuleStart_d

◆ moduleId() [1/2]

uint32_t* SiPixelClustersCUDA::moduleId ( )
inline

Definition at line 31 of file SiPixelClustersCUDA.h.

References moduleId_d.

31 { return moduleId_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> moduleId_d

◆ moduleId() [2/2]

uint32_t const* SiPixelClustersCUDA::moduleId ( ) const
inline

Definition at line 36 of file SiPixelClustersCUDA.h.

References moduleId_d.

36 { return moduleId_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> moduleId_d

◆ moduleStart() [1/2]

uint32_t* SiPixelClustersCUDA::moduleStart ( )
inline

Definition at line 29 of file SiPixelClustersCUDA.h.

References moduleStart_d.

29 { return moduleStart_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> moduleStart_d

◆ moduleStart() [2/2]

uint32_t const* SiPixelClustersCUDA::moduleStart ( ) const
inline

Definition at line 34 of file SiPixelClustersCUDA.h.

References moduleStart_d.

34 { return moduleStart_d.get(); }
cms::cuda::device::unique_ptr< uint32_t[]> moduleStart_d

◆ nClusters()

uint32_t SiPixelClustersCUDA::nClusters ( ) const
inline

Definition at line 26 of file SiPixelClustersCUDA.h.

References nClusters_h.

Referenced by setNClusters().

26 { return nClusters_h; }

◆ offsetBPIX2()

int32_t SiPixelClustersCUDA::offsetBPIX2 ( ) const
inline

Definition at line 27 of file SiPixelClustersCUDA.h.

References offsetBPIX2_h.

Referenced by setNClusters().

27 { return offsetBPIX2_h; }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SiPixelClustersCUDA& SiPixelClustersCUDA::operator= ( SiPixelClustersCUDA &&  )
default

◆ setNClusters()

void SiPixelClustersCUDA::setNClusters ( uint32_t  nClusters,
int32_t  offsetBPIX2 
)
inline

◆ view()

SiPixelClustersCUDASOAView const* SiPixelClustersCUDA::view ( ) const
inline

Definition at line 52 of file SiPixelClustersCUDA.h.

References view_d.

Referenced by SiPixelClustersCUDA().

52 { return view_d.get(); }
cms::cuda::device::unique_ptr< SiPixelClustersCUDASOAView > view_d

Member Data Documentation

◆ clusInModule_d

cms::cuda::device::unique_ptr<uint32_t[]> SiPixelClustersCUDA::clusInModule_d
private

Definition at line 56 of file SiPixelClustersCUDA.h.

Referenced by clusInModule(), and SiPixelClustersCUDA().

◆ clusModuleStart_d

cms::cuda::device::unique_ptr<uint32_t[]> SiPixelClustersCUDA::clusModuleStart_d
private

Definition at line 60 of file SiPixelClustersCUDA.h.

Referenced by clusModuleStart(), and SiPixelClustersCUDA().

◆ moduleId_d

cms::cuda::device::unique_ptr<uint32_t[]> SiPixelClustersCUDA::moduleId_d
private

Definition at line 57 of file SiPixelClustersCUDA.h.

Referenced by moduleId(), and SiPixelClustersCUDA().

◆ moduleStart_d

cms::cuda::device::unique_ptr<uint32_t[]> SiPixelClustersCUDA::moduleStart_d
private

Definition at line 55 of file SiPixelClustersCUDA.h.

Referenced by moduleStart(), and SiPixelClustersCUDA().

◆ nClusters_h

uint32_t SiPixelClustersCUDA::nClusters_h = 0
private

Definition at line 64 of file SiPixelClustersCUDA.h.

Referenced by nClusters(), and setNClusters().

◆ offsetBPIX2_h

int32_t SiPixelClustersCUDA::offsetBPIX2_h = 0
private

Definition at line 65 of file SiPixelClustersCUDA.h.

Referenced by offsetBPIX2(), and setNClusters().

◆ view_d

cms::cuda::device::unique_ptr<SiPixelClustersCUDASOAView> SiPixelClustersCUDA::view_d
private

Definition at line 62 of file SiPixelClustersCUDA.h.

Referenced by SiPixelClustersCUDA(), and view().