CMS 3D CMS Logo

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

#include <HeterogeneousSoA.h>

Public Types

using Product = T
 

Public Member Functions

auto * get ()
 
const auto * get () const
 
 HeterogeneousSoA ()=default
 
 HeterogeneousSoA (cms::cuda::device::unique_ptr< T > &&p)
 
 HeterogeneousSoA (cms::cuda::host::unique_ptr< T > &&p)
 
 HeterogeneousSoA (HeterogeneousSoA &&)=default
 
 HeterogeneousSoA (std::unique_ptr< T > &&p)
 
auto & operator* ()
 
const auto & operator* () const
 
auto * operator-> ()
 
const auto * operator-> () const
 
HeterogeneousSoAoperator= (HeterogeneousSoA &&)=default
 
cms::cuda::host::unique_ptr< TtoHostAsync (cudaStream_t stream) const
 
 ~HeterogeneousSoA ()=default
 

Private Attributes

cms::cuda::device::unique_ptr< Tdm_ptr
 
cms::cuda::host::unique_ptr< Thm_ptr
 
std::unique_ptr< Tstd_ptr
 

Detailed Description

template<typename T>
class HeterogeneousSoA< T >

Definition at line 13 of file HeterogeneousSoA.h.

Member Typedef Documentation

◆ Product

template<typename T >
using HeterogeneousSoA< T >::Product = T

Definition at line 15 of file HeterogeneousSoA.h.

Constructor & Destructor Documentation

◆ HeterogeneousSoA() [1/5]

template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( )
default

◆ ~HeterogeneousSoA()

template<typename T >
HeterogeneousSoA< T >::~HeterogeneousSoA ( )
default

◆ HeterogeneousSoA() [2/5]

template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( HeterogeneousSoA< T > &&  )
default

◆ HeterogeneousSoA() [3/5]

template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( cms::cuda::device::unique_ptr< T > &&  p)
inlineexplicit

Definition at line 22 of file HeterogeneousSoA.h.

22 : dm_ptr(std::move(p)) {}

◆ HeterogeneousSoA() [4/5]

template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( cms::cuda::host::unique_ptr< T > &&  p)
inlineexplicit

Definition at line 23 of file HeterogeneousSoA.h.

23 : hm_ptr(std::move(p)) {}

◆ HeterogeneousSoA() [5/5]

template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( std::unique_ptr< T > &&  p)
inlineexplicit

Definition at line 24 of file HeterogeneousSoA.h.

24 : std_ptr(std::move(p)) {}

Member Function Documentation

◆ get() [1/2]

template<typename T >
auto* HeterogeneousSoA< T >::get ( )
inline

◆ get() [2/2]

template<typename T >
const auto* HeterogeneousSoA< T >::get ( ) const
inline

◆ operator*() [1/2]

template<typename T >
auto& HeterogeneousSoA< T >::operator* ( )
inline

Definition at line 34 of file HeterogeneousSoA.h.

34 { return *get(); }

References HeterogeneousSoA< T >::get().

◆ operator*() [2/2]

template<typename T >
const auto& HeterogeneousSoA< T >::operator* ( ) const
inline

Definition at line 28 of file HeterogeneousSoA.h.

28 { return *get(); }

References HeterogeneousSoA< T >::get().

◆ operator->() [1/2]

template<typename T >
auto* HeterogeneousSoA< T >::operator-> ( )
inline

Definition at line 36 of file HeterogeneousSoA.h.

36 { return get(); }

References HeterogeneousSoA< T >::get().

◆ operator->() [2/2]

template<typename T >
const auto* HeterogeneousSoA< T >::operator-> ( ) const
inline

Definition at line 30 of file HeterogeneousSoA.h.

30 { return get(); }

References HeterogeneousSoA< T >::get().

◆ operator=()

template<typename T >
HeterogeneousSoA& HeterogeneousSoA< T >::operator= ( HeterogeneousSoA< T > &&  )
default

◆ toHostAsync()

template<typename T >
cms::cuda::host::unique_ptr<T> HeterogeneousSoA< T >::toHostAsync ( cudaStream_t  stream) const
inline

Definition at line 39 of file HeterogeneousSoA.h.

39  {
40  assert(dm_ptr);
41  auto ret = cms::cuda::make_host_unique<T>(stream);
42  cudaCheck(cudaMemcpyAsync(ret.get(), dm_ptr.get(), sizeof(T), cudaMemcpyDefault, stream));
43  return ret;
44  }

References cms::cuda::assert(), cudaCheck, HeterogeneousSoA< T >::dm_ptr, runTheMatrix::ret, and cms::cuda::stream.

Member Data Documentation

◆ dm_ptr

template<typename T >
cms::cuda::device::unique_ptr<T> HeterogeneousSoA< T >::dm_ptr
private

◆ hm_ptr

template<typename T >
cms::cuda::host::unique_ptr<T> HeterogeneousSoA< T >::hm_ptr
private

Definition at line 49 of file HeterogeneousSoA.h.

Referenced by HeterogeneousSoA< T >::get().

◆ std_ptr

template<typename T >
std::unique_ptr<T> HeterogeneousSoA< T >::std_ptr
private

Definition at line 50 of file HeterogeneousSoA.h.

Referenced by HeterogeneousSoA< T >::get().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
HeterogeneousSoA::dm_ptr
cms::cuda::device::unique_ptr< T > dm_ptr
Definition: HeterogeneousSoA.h:48
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
cms::cuda::assert
assert(be >=bs)
HeterogeneousSoA::hm_ptr
cms::cuda::host::unique_ptr< T > hm_ptr
Definition: HeterogeneousSoA.h:49
HeterogeneousSoA::get
const auto * get() const
Definition: HeterogeneousSoA.h:26
HeterogeneousSoA::std_ptr
std::unique_ptr< T > std_ptr
Definition: HeterogeneousSoA.h:50
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