CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
cms::alpakatools::ScopedContextTask< TQueue, typename > Class Template Reference

#include <ScopedContext.h>

Inheritance diagram for cms::alpakatools::ScopedContextTask< TQueue, typename >:
cms::alpakatools::impl::ScopedContextBase< TQueue >

Public Types

using Queue = TQueue
 
using ScopedContextBase = impl::ScopedContextBase< Queue >
 
- Public Types inherited from cms::alpakatools::impl::ScopedContextBase< TQueue >
using Device = alpaka::Dev< Queue >
 
using Platform = alpaka::Pltf< Device >
 
using Queue = TQueue
 

Public Member Functions

template<typename F >
void pushNextTask (F &&f)
 
Queuequeue ()
 
const std::shared_ptr< Queue > & queuePtr () const
 
void replaceWaitingTaskHolder (edm::WaitingTaskWithArenaHolder waitingTaskHolder)
 
 ScopedContextTask (ContextState< Queue > const *state, edm::WaitingTaskWithArenaHolder waitingTaskHolder)
 Constructor to re-use the queue of acquire() (ExternalWork module) More...
 
 ~ScopedContextTask ()
 
- Public Member Functions inherited from cms::alpakatools::impl::ScopedContextBase< TQueue >
Device device () const
 
Queuequeue ()
 
const std::shared_ptr< Queue > & queuePtr () const
 

Private Attributes

ContextState< Queue > const * contextState_
 
impl::ScopedContextHolderHelper holderHelper_
 

Additional Inherited Members

- Protected Member Functions inherited from cms::alpakatools::impl::ScopedContextBase< TQueue >
 ScopedContextBase (ProductBase< Queue > const &data)
 
 ScopedContextBase (std::shared_ptr< Queue > queue)
 
 ScopedContextBase (edm::StreamID streamID)
 

Detailed Description

template<typename TQueue, typename>
class cms::alpakatools::ScopedContextTask< TQueue, typename >

The aim of this class is to do necessary per-task "initialization" tasks created in ExternalWork acquire():

Definition at line 251 of file ScopedContext.h.

Member Typedef Documentation

◆ Queue

template<typename TQueue , typename >
using cms::alpakatools::ScopedContextTask< TQueue, typename >::Queue = TQueue

Definition at line 253 of file ScopedContext.h.

◆ ScopedContextBase

template<typename TQueue , typename >
using cms::alpakatools::ScopedContextTask< TQueue, typename >::ScopedContextBase = impl::ScopedContextBase<Queue>

Definition at line 254 of file ScopedContext.h.

Constructor & Destructor Documentation

◆ ScopedContextTask()

template<typename TQueue , typename >
cms::alpakatools::ScopedContextTask< TQueue, typename >::ScopedContextTask ( ContextState< Queue > const *  state,
edm::WaitingTaskWithArenaHolder  waitingTaskHolder 
)
inlineexplicit

Constructor to re-use the queue of acquire() (ExternalWork module)

Definition at line 259 of file ScopedContext.h.

References eostools::move().

260  : ScopedContextBase(state->queuePtr()), // don't move, state is re-used afterwards
261  holderHelper_{std::move(waitingTaskHolder)},
262  contextState_{state} {}
impl::ScopedContextHolderHelper holderHelper_
ContextState< Queue > const * contextState_
impl::ScopedContextBase< Queue > ScopedContextBase
def move(src, dest)
Definition: eostools.py:511

◆ ~ScopedContextTask()

template<typename TQueue , typename >
cms::alpakatools::ScopedContextTask< TQueue, typename >::~ScopedContextTask ( )
inline

Member Function Documentation

◆ pushNextTask()

template<typename TQueue , typename >
template<typename F >
void cms::alpakatools::ScopedContextTask< TQueue, typename >::pushNextTask ( F &&  f)
inline

◆ queue()

template<typename TQueue , typename >
Queue& cms::alpakatools::impl::ScopedContextBase< TQueue, typename >::queue
inline

Definition at line 39 of file ScopedContext.h.

39 { return *queue_; }

◆ queuePtr()

template<typename TQueue , typename >
const std::shared_ptr<Queue>& cms::alpakatools::impl::ScopedContextBase< TQueue, typename >::queuePtr
inline

Definition at line 40 of file ScopedContext.h.

40 { return queue_; }

◆ replaceWaitingTaskHolder()

template<typename TQueue , typename >
void cms::alpakatools::ScopedContextTask< TQueue, typename >::replaceWaitingTaskHolder ( edm::WaitingTaskWithArenaHolder  waitingTaskHolder)
inline

Definition at line 271 of file ScopedContext.h.

References cms::alpakatools::ScopedContextTask< TQueue, typename >::holderHelper_, eostools::move(), and cms::alpakatools::impl::ScopedContextHolderHelper::replaceWaitingTaskHolder().

271  {
273  }
impl::ScopedContextHolderHelper holderHelper_
void replaceWaitingTaskHolder(edm::WaitingTaskWithArenaHolder waitingTaskHolder)
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ contextState_

template<typename TQueue , typename >
ContextState<Queue> const* cms::alpakatools::ScopedContextTask< TQueue, typename >::contextState_
private

◆ holderHelper_

template<typename TQueue , typename >
impl::ScopedContextHolderHelper cms::alpakatools::ScopedContextTask< TQueue, typename >::holderHelper_
private