CMS 3D CMS Logo

EDMetadataAcquireSentry.cc
Go to the documentation of this file.
5 
7  namespace detail {
9  : EDMetadataAcquireSentry(detail::chooseDevice(streamID), std::move(holder)) {}
10 
12  : waitingTaskHolder_(std::move(holder)) {
13 #ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
14  // all synchronous backends
15  metadata_ = std::make_shared<EDMetadata>(cms::alpakatools::getQueueCache<Queue>().get(device));
16 #else
17  // all asynchronous backends
18  metadata_ = std::make_shared<EDMetadata>(cms::alpakatools::getQueueCache<Queue>().get(device),
19  cms::alpakatools::getEventCache<Event>().get(device));
20 #endif
21  }
22 
23 #ifndef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
24  // all asynchronous backends
25  std::shared_ptr<EDMetadata> EDMetadataAcquireSentry::finish() {
26  metadata_->enqueueCallback(std::move(waitingTaskHolder_));
27  return std::move(metadata_);
28  }
29 #endif
30  } // namespace detail
31 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
EDMetadataAcquireSentry(edm::StreamID stream, edm::WaitingTaskWithArenaHolder holder)
Device const & chooseDevice(edm::StreamID id)
Definition: chooseDevice.cc:9
def move(src, dest)
Definition: eostools.py:511