CMS 3D CMS Logo

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

#include <ChannelLocsGPU.h>

Inheritance diagram for ChannelLocsGPU:
ChannelLocsBase< cms::cuda::device::unique_ptr >

Public Member Functions

 ChannelLocsGPU (size_t size, cudaStream_t stream)
 
 ChannelLocsGPU (ChannelLocsGPU &&arg)
 
 ChannelLocsGPU (ChannelLocsGPU &)=delete
 
 ChannelLocsGPU (const ChannelLocsGPU &)=delete
 
const ChannelLocsViewchannelLocsView () const
 
ChannelLocsGPUoperator= (const ChannelLocsGPU &)=delete
 
ChannelLocsGPUoperator= (ChannelLocsGPU &&)=delete
 
void setVals (const ChannelLocs *c, cms::cuda::host::unique_ptr< const uint8_t *[]> inputGPU, cudaStream_t stream)
 
 ~ChannelLocsGPU () override=default
 
- Public Member Functions inherited from ChannelLocsBase< cms::cuda::device::unique_ptr >
 ChannelLocsBase (size_t size)
 
 ChannelLocsBase (ChannelLocsBase &&arg)
 
stripgpu::detId_t detID (uint32_t index) const
 
stripgpu::detId_tdetID () const
 
stripgpu::fedCh_t fedCh (uint32_t index) const
 
stripgpu::fedCh_tfedCh () const
 
stripgpu::fedId_t fedID (uint32_t index) const
 
stripgpu::fedId_tfedID () const
 
size_t inoff (uint32_t index) const
 
size_t * inoff () const
 
const uint8_t * input (uint32_t index) const
 
const uint8_t *const * input () const
 
uint16_t length (uint32_t index) const
 
uint16_t * length () const
 
size_t offset (uint32_t index) const
 
size_t * offset () const
 
void setChannelLoc (uint32_t index, const uint8_t *input, size_t inoff, size_t offset, uint16_t length, stripgpu::fedId_t fedID, stripgpu::fedCh_t fedCh, stripgpu::detId_t detID)
 
size_t size () const
 
virtual ~ChannelLocsBase ()=default
 

Private Attributes

cms::cuda::device::unique_ptr< ChannelLocsViewchannelLocsViewGPU_
 

Additional Inherited Members

- Protected Attributes inherited from ChannelLocsBase< cms::cuda::device::unique_ptr >
cms::cuda::device::unique_ptr< stripgpu::detId_t[]> detID_
 
cms::cuda::device::unique_ptr< stripgpu::fedCh_t[]> fedCh_
 
cms::cuda::device::unique_ptr< stripgpu::fedId_t[]> fedID_
 
cms::cuda::device::unique_ptr< size_t[]> inoff_
 
cms::cuda::device::unique_ptr< const uint8_t *[]> input_
 
cms::cuda::device::unique_ptr< uint16_t[]> length_
 
cms::cuda::device::unique_ptr< size_t[]> offset_
 
size_t size_
 

Detailed Description

Definition at line 117 of file ChannelLocsGPU.h.

Constructor & Destructor Documentation

◆ ChannelLocsGPU() [1/4]

ChannelLocsGPU::ChannelLocsGPU ( size_t  size,
cudaStream_t  stream 
)

Definition at line 32 of file ChannelLocsGPU.cc.

References channelLocsView(), channelLocsViewGPU_, cms::cuda::copyAsync(), ChannelLocsBase< cms::cuda::device::unique_ptr >::detID_, ChannelLocsBase< cms::cuda::device::unique_ptr >::fedCh_, ChannelLocsBase< cms::cuda::device::unique_ptr >::fedID_, ChannelLocsView::fill(), ChannelLocsBase< cms::cuda::device::unique_ptr >::inoff_, ChannelLocsBase< cms::cuda::device::unique_ptr >::input_, ChannelLocsBase< cms::cuda::device::unique_ptr >::length_, ChannelLocsBase< cms::cuda::device::unique_ptr >::offset_, ChannelLocsBase< cms::cuda::device::unique_ptr >::size(), and cms::cuda::stream.

33  if (size > 0) {
34  input_ = cms::cuda::make_device_unique<const uint8_t*[]>(size, stream);
35  inoff_ = cms::cuda::make_device_unique<size_t[]>(size, stream);
36  offset_ = cms::cuda::make_device_unique<size_t[]>(size, stream);
37  length_ = cms::cuda::make_device_unique<uint16_t[]>(size, stream);
38  fedID_ = cms::cuda::make_device_unique<stripgpu::fedId_t[]>(size, stream);
39  fedCh_ = cms::cuda::make_device_unique<stripgpu::fedCh_t[]>(size, stream);
40  detID_ = cms::cuda::make_device_unique<stripgpu::detId_t[]>(size, stream);
41 
42  auto channelLocsView = cms::cuda::make_host_unique<ChannelLocsView>(stream);
43  channelLocsView->fill(*this);
44  channelLocsViewGPU_ = cms::cuda::make_device_unique<ChannelLocsView>(stream);
46  }
47 }
cms::cuda::device::unique_ptr< stripgpu::fedId_t[]> fedID_
const ChannelLocsView * channelLocsView() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
cms::cuda::device::unique_ptr< size_t[]> inoff_
cms::cuda::device::unique_ptr< stripgpu::fedCh_t[]> fedCh_
cms::cuda::device::unique_ptr< const uint8_t *[]> input_
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< ChannelLocsView > channelLocsViewGPU_
void fill(const ChannelLocsGPU &c)
cms::cuda::device::unique_ptr< stripgpu::detId_t[]> detID_
cms::cuda::device::unique_ptr< uint16_t[]> length_
cms::cuda::device::unique_ptr< size_t[]> offset_

◆ ChannelLocsGPU() [2/4]

ChannelLocsGPU::ChannelLocsGPU ( ChannelLocsGPU &&  arg)
inline

Definition at line 121 of file ChannelLocsGPU.h.

122  : ChannelLocsBase(std::move(arg)), channelLocsViewGPU_(std::move(arg.channelLocsViewGPU_)) {}
A arg
Definition: Factorize.h:31
cms::cuda::device::unique_ptr< ChannelLocsView > channelLocsViewGPU_
def move(src, dest)
Definition: eostools.py:511

◆ ChannelLocsGPU() [3/4]

ChannelLocsGPU::ChannelLocsGPU ( ChannelLocsGPU )
delete

◆ ChannelLocsGPU() [4/4]

ChannelLocsGPU::ChannelLocsGPU ( const ChannelLocsGPU )
delete

◆ ~ChannelLocsGPU()

ChannelLocsGPU::~ChannelLocsGPU ( )
overridedefault

Member Function Documentation

◆ channelLocsView()

const ChannelLocsView* ChannelLocsGPU::channelLocsView ( ) const
inline

Definition at line 132 of file ChannelLocsGPU.h.

References channelLocsViewGPU_.

Referenced by ChannelLocsGPU().

132 { return channelLocsViewGPU_.get(); }
cms::cuda::device::unique_ptr< ChannelLocsView > channelLocsViewGPU_

◆ operator=() [1/2]

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

◆ operator=() [2/2]

ChannelLocsGPU& ChannelLocsGPU::operator= ( ChannelLocsGPU &&  )
delete

◆ setVals()

void ChannelLocsGPU::setVals ( const ChannelLocs c,
cms::cuda::host::unique_ptr< const uint8_t *[]>  inputGPU,
cudaStream_t  stream 
)

Definition at line 49 of file ChannelLocsGPU.cc.

References cms::cuda::assert(), DummyCfis::c, cms::cuda::copyAsync(), ChannelLocsBase< cms::cuda::device::unique_ptr >::detID_, ChannelLocsBase< cms::cuda::device::unique_ptr >::fedCh_, ChannelLocsBase< cms::cuda::device::unique_ptr >::fedID_, ChannelLocsBase< cms::cuda::device::unique_ptr >::inoff_, ChannelLocsBase< cms::cuda::device::unique_ptr >::input_, ChannelLocsBase< cms::cuda::device::unique_ptr >::length_, ChannelLocsBase< cms::cuda::device::unique_ptr >::offset_, ChannelLocsBase< cms::cuda::device::unique_ptr >::size_, and cms::cuda::stream.

51  {
52  assert(c->size() == size_);
60 }
cms::cuda::device::unique_ptr< stripgpu::fedId_t[]> fedID_
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
assert(be >=bs)
cms::cuda::device::unique_ptr< size_t[]> inoff_
cms::cuda::device::unique_ptr< stripgpu::fedCh_t[]> fedCh_
cms::cuda::device::unique_ptr< const uint8_t *[]> input_
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< stripgpu::detId_t[]> detID_
cms::cuda::device::unique_ptr< uint16_t[]> length_
cms::cuda::device::unique_ptr< size_t[]> offset_

Member Data Documentation

◆ channelLocsViewGPU_

cms::cuda::device::unique_ptr<ChannelLocsView> ChannelLocsGPU::channelLocsViewGPU_
private

Definition at line 135 of file ChannelLocsGPU.h.

Referenced by ChannelLocsGPU(), and channelLocsView().