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

T const * get () const
 
Tget ()
 
 HeterogeneousSoAImpl ()=default
 
 HeterogeneousSoAImpl (HeterogeneousSoAImpl &&)=default
 
 HeterogeneousSoAImpl (unique_ptr< T > &&p)
 
 HeterogeneousSoAImpl (cudaStream_t stream)
 
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.

◆ HeterogeneousSoAImpl() [4/4]

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

Definition at line 170 of file HeterogeneousSoA.h.

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

170  {
171  m_ptr = Traits::template make_unique<T>(stream);
172 }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
unique_ptr< T > m_ptr
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521

Member Function Documentation

◆ get() [1/2]

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

◆ get() [2/2]

template<typename T , typename Traits >
T* HeterogeneousSoAImpl< T, Traits >::get ( )
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.

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

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 }
ret
prodAgent to be discontinued
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69
long double T

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().