CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 const * get () const
 
auto * get ()
 
 HeterogeneousSoA ()=default
 
 HeterogeneousSoA (HeterogeneousSoA &&)=default
 
 HeterogeneousSoA (cms::cuda::device::unique_ptr< T > &&p)
 
 HeterogeneousSoA (cms::cuda::host::unique_ptr< T > &&p)
 
 HeterogeneousSoA (std::unique_ptr< T > &&p)
 
auto const & operator* () const
 
auto & operator* ()
 
auto const * operator-> () const
 
auto * operator-> ()
 
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

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

Definition at line 15 of file HeterogeneousSoA.h.

Constructor & Destructor Documentation

template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( )
default
template<typename T >
HeterogeneousSoA< T >::~HeterogeneousSoA ( )
default
template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( HeterogeneousSoA< T > &&  )
default
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)) {}
cms::cuda::device::unique_ptr< T > dm_ptr
def move
Definition: eostools.py:511
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)) {}
def move
Definition: eostools.py:511
cms::cuda::host::unique_ptr< T > hm_ptr
template<typename T >
HeterogeneousSoA< T >::HeterogeneousSoA ( std::unique_ptr< T > &&  p)
inlineexplicit

Definition at line 24 of file HeterogeneousSoA.h.

Member Function Documentation

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

Definition at line 26 of file HeterogeneousSoA.h.

References HeterogeneousSoA< T >::dm_ptr, HeterogeneousSoA< T >::hm_ptr, and HeterogeneousSoA< T >::std_ptr.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), gpuVertexFinder::Producer::make(), CAHitNtupletGeneratorOnGPU::makeTuples(), CAHitNtupletGeneratorOnGPU::makeTuplesAsync(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

26 { return dm_ptr ? dm_ptr.get() : (hm_ptr ? hm_ptr.get() : std_ptr.get()); }
std::unique_ptr< T > std_ptr
cms::cuda::device::unique_ptr< T > dm_ptr
cms::cuda::host::unique_ptr< T > hm_ptr
template<typename T >
auto* HeterogeneousSoA< T >::get ( )
inline
template<typename T >
auto const& HeterogeneousSoA< T >::operator* ( ) const
inline

Definition at line 28 of file HeterogeneousSoA.h.

28 { return *get(); }
template<typename T >
auto& HeterogeneousSoA< T >::operator* ( )
inline

Definition at line 34 of file HeterogeneousSoA.h.

34 { return *get(); }
template<typename T >
auto const* HeterogeneousSoA< T >::operator-> ( ) const
inline

Definition at line 30 of file HeterogeneousSoA.h.

30 { return get(); }
template<typename T >
auto* HeterogeneousSoA< T >::operator-> ( )
inline

Definition at line 36 of file HeterogeneousSoA.h.

36 { return get(); }
template<typename T >
HeterogeneousSoA& HeterogeneousSoA< T >::operator= ( HeterogeneousSoA< T > &&  )
default
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.

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

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  }
tuple ret
prodAgent to be discontinued
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< T > dm_ptr
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69
long double T

Member Data Documentation

template<typename T >
cms::cuda::device::unique_ptr<T> HeterogeneousSoA< T >::dm_ptr
private
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().

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