CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HeterogeneousSoAImpl< T, Traits > Class Template Reference

#include <HeterogeneousSoA.h>

Public Types

template<typename V >
using unique_ptr = typename Traits::template unique_ptr< V >
 

Public Member Functions

Tget ()
 
const Tget () const
 
 HeterogeneousSoAImpl ()=default
 
 HeterogeneousSoAImpl (cudaStream_t stream)
 
 HeterogeneousSoAImpl (HeterogeneousSoAImpl &&)=default
 
 HeterogeneousSoAImpl (unique_ptr< T > &&p)
 
HeterogeneousSoAImploperator= (HeterogeneousSoAImpl &&)=default
 
cms::cuda::host::unique_ptr< TtoHostAsync (cudaStream_t stream) const
 
 ~HeterogeneousSoAImpl ()=default
 

Private Attributes

unique_ptr< Tm_ptr
 

Detailed Description

template<typename T, typename Traits>
class HeterogeneousSoAImpl< T, Traits >

Definition at line 146 of file HeterogeneousSoA.h.

Member Typedef Documentation

◆ unique_ptr

template<typename T , typename Traits >
template<typename V >
using HeterogeneousSoAImpl< T, Traits >::unique_ptr = typename Traits::template unique_ptr<V>

Definition at line 149 of file HeterogeneousSoA.h.

Constructor & Destructor Documentation

◆ HeterogeneousSoAImpl() [1/4]

template<typename T , typename Traits >
HeterogeneousSoAImpl< T, Traits >::HeterogeneousSoAImpl ( )
default

◆ ~HeterogeneousSoAImpl()

template<typename T , typename Traits >
HeterogeneousSoAImpl< T, Traits >::~HeterogeneousSoAImpl ( )
default

◆ HeterogeneousSoAImpl() [2/4]

template<typename T , typename Traits >
HeterogeneousSoAImpl< T, Traits >::HeterogeneousSoAImpl ( HeterogeneousSoAImpl< T, Traits > &&  )
default

◆ HeterogeneousSoAImpl() [3/4]

template<typename T , typename Traits >
HeterogeneousSoAImpl< T, Traits >::HeterogeneousSoAImpl ( unique_ptr< T > &&  p)
inlineexplicit

Definition at line 156 of file HeterogeneousSoA.h.

156 : m_ptr(std::move(p)) {}

◆ HeterogeneousSoAImpl() [4/4]

template<typename T , typename Traits >
HeterogeneousSoAImpl< T, Traits >::HeterogeneousSoAImpl ( cudaStream_t  stream)
explicit

Definition at line 170 of file HeterogeneousSoA.h.

170  {
171  m_ptr = Traits::template make_unique<T>(stream);
172 }

References cms::cuda::stream, and svgfig::template().

Member Function Documentation

◆ get() [1/2]

template<typename T , typename Traits >
T* HeterogeneousSoAImpl< T, Traits >::get ( )
inline

◆ get() [2/2]

template<typename T , typename Traits >
const T* HeterogeneousSoAImpl< T, Traits >::get ( ) const
inline

◆ operator=()

template<typename T , typename Traits >
HeterogeneousSoAImpl& HeterogeneousSoAImpl< T, Traits >::operator= ( HeterogeneousSoAImpl< T, Traits > &&  )
default

◆ toHostAsync()

template<typename T , typename Traits >
cms::cuda::host::unique_ptr< T > HeterogeneousSoAImpl< T, Traits >::toHostAsync ( cudaStream_t  stream) const

Definition at line 176 of file HeterogeneousSoA.h.

176  {
177  auto ret = cms::cuda::make_host_unique<T>(stream);
178  cudaCheck(cudaMemcpyAsync(ret.get(), get(), sizeof(T), cudaMemcpyDefault, stream));
179  return ret;
180 }

References cudaCheck, get, runTheMatrix::ret, and cms::cuda::stream.

Member Data Documentation

◆ m_ptr

template<typename T , typename Traits >
unique_ptr<T> HeterogeneousSoAImpl< T, Traits >::m_ptr
private

Definition at line 166 of file HeterogeneousSoA.h.

Referenced by HeterogeneousSoAImpl< T, Traits >::get().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:373
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
HeterogeneousSoAImpl::m_ptr
unique_ptr< T > m_ptr
Definition: HeterogeneousSoA.h:166
svgfig.template
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
eostools.move
def move(src, dest)
Definition: eostools.py:511
cudaCheck
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:62
T
long double T
Definition: Basic3DVectorLD.h:48
HeterogeneousSoAImpl::get
const T * get() const
Definition: HeterogeneousSoA.h:159