src
HeterogeneousCore
AlpakaCore
src
alpaka
EDMetadataAcquireSentry.cc
Go to the documentation of this file.
1
#include "
HeterogeneousCore/AlpakaCore/interface/alpaka/chooseDevice.h
"
2
#include "
HeterogeneousCore/AlpakaCore/interface/alpaka/EDMetadataAcquireSentry.h
"
3
#include "
HeterogeneousCore/AlpakaCore/interface/EventCache.h
"
4
#include "
HeterogeneousCore/AlpakaCore/interface/QueueCache.h
"
5
6
namespace
ALPAKA_ACCELERATOR_NAMESPACE
{
7
namespace
detail
{
8
EDMetadataAcquireSentry::EDMetadataAcquireSentry
(
edm::StreamID
streamID,
edm::WaitingTaskWithArenaHolder
holder)
9
:
EDMetadataAcquireSentry
(
detail
::
chooseDevice
(streamID),
std
::
move
(holder)) {}
10
11
EDMetadataAcquireSentry::EDMetadataAcquireSentry
(Device
const
& device,
edm::WaitingTaskWithArenaHolder
holder)
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
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataAcquireSentry::EDMetadataAcquireSentry
EDMetadataAcquireSentry(edm::StreamID stream, edm::WaitingTaskWithArenaHolder holder)
Definition:
EDMetadataAcquireSentry.cc:8
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataAcquireSentry::metadata_
std::shared_ptr< EDMetadata > metadata_
Definition:
EDMetadataAcquireSentry.h:40
EDMetadataAcquireSentry.h
edm::StreamID
Definition:
StreamID.h:30
std
Definition:
JetResolutionObject.h:76
edm::WaitingTaskWithArenaHolder
Definition:
WaitingTaskWithArenaHolder.h:34
chooseDevice.h
ALPAKA_ACCELERATOR_NAMESPACE
Definition:
PortableCollection.h:15
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataAcquireSentry
Definition:
EDMetadataAcquireSentry.h:15
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataAcquireSentry::finish
std::shared_ptr< EDMetadata > finish()
Definition:
EDMetadataAcquireSentry.cc:25
detail
Definition:
TrackerDetIdSelector.h:21
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataAcquireSentry::waitingTaskHolder_
edm::WaitingTaskWithArenaHolder waitingTaskHolder_
Definition:
EDMetadataAcquireSentry.h:42
EventCache.h
ALPAKA_ACCELERATOR_NAMESPACE::detail::chooseDevice
Device const & chooseDevice(edm::StreamID id)
Definition:
chooseDevice.cc:9
QueueCache.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.14