#include <ScopedContext.h>
Public Member Functions | |
template<typename T , typename... Args> | |
auto | emplace (edm::Event &iEvent, edm::EDPutTokenT< T > token, Args &&... args) |
ScopedContextProduce (const ProductBase &data) | |
Constructor to (possibly) re-use a CUDA stream (non-ExternalWork module) More... | |
ScopedContextProduce (ContextState &state) | |
Constructor to re-use the CUDA stream of acquire() (ExternalWork module) More... | |
ScopedContextProduce (edm::StreamID streamID) | |
Constructor to create a new CUDA stream (non-ExternalWork module) More... | |
template<typename T > | |
std::unique_ptr< Product< T > > | wrap (T data) |
~ScopedContextProduce () | |
Record the CUDA event, all asynchronous work must have been queued before the destructor. More... | |
Public Member Functions inherited from cms::cuda::impl::ScopedContextGetterBase | |
template<typename T > | |
const T & | get (const edm::Event &iEvent, edm::EDGetTokenT< Product< T >> token) |
template<typename T > | |
const T & | get (const Product< T > &data) |
Public Member Functions inherited from cms::cuda::impl::ScopedContextBase | |
int | device () const |
cudaStream_t | stream () const |
const SharedStreamPtr & | streamPtr () const |
Private Member Functions | |
ScopedContextProduce (int device, SharedStreamPtr stream, SharedEventPtr event) | |
Private Attributes | |
SharedEventPtr | event_ = getEventCache().get() |
Friends | |
class | cudatest::TestScopedContext |
Additional Inherited Members | |
Protected Member Functions inherited from cms::cuda::impl::ScopedContextGetterBase | |
template<typename... Args> | |
ScopedContextGetterBase (Args &&... args) | |
void | synchronizeStreams (int dataDevice, cudaStream_t dataStream, bool available, cudaEvent_t dataEvent) |
Protected Member Functions inherited from cms::cuda::impl::ScopedContextBase | |
ScopedContextBase (const ProductBase &data) | |
ScopedContextBase (edm::StreamID streamID) | |
ScopedContextBase (int device, SharedStreamPtr stream) | |
The aim of this class is to do necessary per-event "initialization" in ExternalWork produce() or normal produce():
Definition at line 149 of file ScopedContext.h.
|
inlineexplicit |
Constructor to create a new CUDA stream (non-ExternalWork module)
Definition at line 152 of file ScopedContext.h.
|
inlineexplicit |
Constructor to (possibly) re-use a CUDA stream (non-ExternalWork module)
Definition at line 155 of file ScopedContext.h.
|
inlineexplicit |
Constructor to re-use the CUDA stream of acquire() (ExternalWork module)
Definition at line 158 of file ScopedContext.h.
cms::cuda::ScopedContextProduce::~ScopedContextProduce | ( | ) |
Record the CUDA event, all asynchronous work must have been queued before the destructor.
Definition at line 108 of file ScopedContext.cc.
References event_, and cms::cuda::impl::ScopedContextBase::stream().
|
inlineexplicitprivate |
Definition at line 179 of file ScopedContext.h.
References eostools::move().
|
inline |
Definition at line 171 of file ScopedContext.h.
References writedatasetfile::args, cms::cuda::impl::ScopedContextBase::device(), event_, iEvent, cms::cuda::impl::ScopedContextBase::streamPtr(), and unpackBuffers-CaloStage2::token.
|
inline |
Definition at line 165 of file ScopedContext.h.
References data, cms::cuda::impl::ScopedContextBase::device(), event_, eostools::move(), and cms::cuda::impl::ScopedContextBase::streamPtr().
|
friend |
Definition at line 176 of file ScopedContext.h.
|
private |
Definition at line 183 of file ScopedContext.h.
Referenced by emplace(), wrap(), and ~ScopedContextProduce().