CMS 3D CMS Logo

List of all members | Public Member Functions
SiStripClustersCUDAHost Class Reference

#include <SiStripClustersCUDA.h>

Inheritance diagram for SiStripClustersCUDAHost:
SiStripClustersSOABase< cms::cuda::host::unique_ptr >

Public Member Functions

SiStripClustersCUDAHostoperator= (const SiStripClustersCUDAHost &)=delete
 
SiStripClustersCUDAHostoperator= (SiStripClustersCUDAHost &&)=default
 
 SiStripClustersCUDAHost ()=default
 
 SiStripClustersCUDAHost (const SiStripClustersCUDADevice &clusters_d, cudaStream_t stream)
 
 SiStripClustersCUDAHost (const SiStripClustersCUDAHost &)=delete
 
 SiStripClustersCUDAHost (SiStripClustersCUDAHost &&)=default
 
 ~SiStripClustersCUDAHost () override=default
 
- Public Member Functions inherited from SiStripClustersSOABase< cms::cuda::host::unique_ptr >
const auto & barycenter () const
 
auto & barycenter ()
 
const auto & charge () const
 
auto & charge ()
 
const auto & clusterADCs () const
 
auto & clusterADCs ()
 
const auto & clusterDetId () const
 
auto & clusterDetId ()
 
const auto & clusterIndex () const
 
auto & clusterIndex ()
 
const auto & clusterSize () const
 
auto & clusterSize ()
 
const auto & firstStrip () const
 
auto & firstStrip ()
 
uint32_t maxClusterSize () const
 
uint32_t nClusters () const
 
SiStripClustersSOABaseoperator= (const SiStripClustersSOABase &)=delete
 
SiStripClustersSOABaseoperator= (SiStripClustersSOABase &&)=default
 
void setMaxClusterSize (uint32_t maxClusterSize)
 
void setNClusters (uint32_t nClusters)
 
 SiStripClustersSOABase ()=default
 
 SiStripClustersSOABase (const SiStripClustersSOABase &)=delete
 
 SiStripClustersSOABase (SiStripClustersSOABase &&)=default
 
const auto & trueCluster () const
 
auto & trueCluster ()
 
virtual ~SiStripClustersSOABase ()=default
 

Additional Inherited Members

- Protected Attributes inherited from SiStripClustersSOABase< cms::cuda::host::unique_ptr >
cms::cuda::host::unique_ptr< float[]> barycenter_
 
cms::cuda::host::unique_ptr< float[]> charge_
 
cms::cuda::host::unique_ptr< uint8_t[]> clusterADCs_
 
cms::cuda::host::unique_ptr< stripgpu::detId_t[]> clusterDetId_
 
cms::cuda::host::unique_ptr< uint32_t[]> clusterIndex_
 
cms::cuda::host::unique_ptr< uint32_t[]> clusterSize_
 
cms::cuda::host::unique_ptr< stripgpu::stripId_t[]> firstStrip_
 
uint32_t maxClusterSize_
 
uint32_t nClusters_
 
cms::cuda::host::unique_ptr< bool[]> trueCluster_
 

Detailed Description

Definition at line 47 of file SiStripClustersCUDA.h.

Constructor & Destructor Documentation

◆ SiStripClustersCUDAHost() [1/4]

SiStripClustersCUDAHost::SiStripClustersCUDAHost ( )
default

◆ SiStripClustersCUDAHost() [2/4]

SiStripClustersCUDAHost::SiStripClustersCUDAHost ( const SiStripClustersCUDADevice clusters_d,
cudaStream_t  stream 
)
explicit

Definition at line 36 of file SiStripClustersCUDA.cc.

References SiStripClustersSOABase< T >::barycenter(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::barycenter_, SiStripClustersSOABase< T >::charge(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::charge_, SiStripClustersSOABase< T >::clusterADCs(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::clusterADCs_, SiStripClustersSOABase< T >::clusterDetId(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::clusterDetId_, SiStripClustersSOABase< T >::clusterIndex(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::clusterIndex_, SiStripClustersSOABase< T >::clusterSize(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::clusterSize_, cms::cuda::copyAsync(), cudaCheck, SiStripClustersSOABase< T >::firstStrip(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::firstStrip_, SiStripClustersCUDADevice::maxClusterSize(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::maxClusterSize_, SiStripClustersCUDADevice::nClusters(), SiStripClustersSOABase< cms::cuda::host::unique_ptr >::nClusters_, cms::cuda::stream, SiStripClustersSOABase< T >::trueCluster(), and SiStripClustersSOABase< cms::cuda::host::unique_ptr >::trueCluster_.

36  {
37  nClusters_ = clusters_d.nClusters();
38  maxClusterSize_ = clusters_d.maxClusterSize();
39  clusterIndex_ = cms::cuda::make_host_unique<uint32_t[]>(nClusters_, stream);
40  clusterSize_ = cms::cuda::make_host_unique<uint32_t[]>(nClusters_, stream);
41  clusterADCs_ = cms::cuda::make_host_unique<uint8_t[]>(nClusters_ * maxClusterSize_, stream);
42  clusterDetId_ = cms::cuda::make_host_unique<stripgpu::detId_t[]>(nClusters_, stream);
43  firstStrip_ = cms::cuda::make_host_unique<stripgpu::stripId_t[]>(nClusters_, stream);
44  trueCluster_ = cms::cuda::make_host_unique<bool[]>(nClusters_, stream);
45  barycenter_ = cms::cuda::make_host_unique<float[]>(nClusters_, stream);
46  charge_ = cms::cuda::make_host_unique<float[]>(nClusters_, stream);
47 
56 #ifdef GPU_CHECK
57  cudaCheck(cudaStreamSynchronize(stream));
58 #endif
59 }
const auto & clusterSize() const
cms::cuda::host::unique_ptr< uint8_t[]> clusterADCs_
cms::cuda::host::unique_ptr< uint32_t[]> clusterSize_
cms::cuda::host::unique_ptr< stripgpu::detId_t[]> clusterDetId_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
const auto & clusterIndex() const
const auto & barycenter() const
const auto & firstStrip() const
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
const auto & trueCluster() const
const auto & charge() const
const auto & clusterADCs() const
cms::cuda::host::unique_ptr< uint32_t[]> clusterIndex_
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69
const auto & clusterDetId() const
cms::cuda::host::unique_ptr< stripgpu::stripId_t[]> firstStrip_

◆ ~SiStripClustersCUDAHost()

SiStripClustersCUDAHost::~SiStripClustersCUDAHost ( )
overridedefault

◆ SiStripClustersCUDAHost() [3/4]

SiStripClustersCUDAHost::SiStripClustersCUDAHost ( const SiStripClustersCUDAHost )
delete

◆ SiStripClustersCUDAHost() [4/4]

SiStripClustersCUDAHost::SiStripClustersCUDAHost ( SiStripClustersCUDAHost &&  )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SiStripClustersCUDAHost& SiStripClustersCUDAHost::operator= ( SiStripClustersCUDAHost &&  )
default