src
HeterogeneousCore
AlpakaCore
src
alpaka
EDMetadataSentry.cc
Go to the documentation of this file.
1
#include "
HeterogeneousCore/AlpakaCore/interface/alpaka/chooseDevice.h
"
2
#include "
HeterogeneousCore/AlpakaCore/interface/alpaka/EDMetadataSentry.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
EDMetadataSentry::EDMetadataSentry
(
edm::StreamID
streamID) {
9
auto
const
& device =
detail::chooseDevice
(streamID);
10
#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
11
metadata_
= std::make_shared<EDMetadata>(cms::alpakatools::getQueueCache<Queue>().
get
(device));
12
#else
13
metadata_
= std::make_shared<EDMetadata>(cms::alpakatools::getQueueCache<Queue>().
get
(device),
14
cms::alpakatools::getEventCache<Event>().
get
(device));
15
#endif
16
}
17
18
void
EDMetadataSentry::finish
() {
metadata_
->recordEvent(); }
19
}
// namespace detail
20
}
// namespace ALPAKA_ACCELERATOR_NAMESPACE
EDMetadataSentry.h
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataSentry::metadata_
std::shared_ptr< EDMetadata > metadata_
Definition:
EDMetadataSentry.h:32
edm::StreamID
Definition:
StreamID.h:30
chooseDevice.h
ALPAKA_ACCELERATOR_NAMESPACE
Definition:
PortableCollection.h:15
detail
Definition:
TrackerDetIdSelector.h:21
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataSentry::finish
void finish()
Definition:
EDMetadataSentry.cc:18
EventCache.h
ALPAKA_ACCELERATOR_NAMESPACE::detail::chooseDevice
Device const & chooseDevice(edm::StreamID id)
Definition:
chooseDevice.cc:9
ALPAKA_ACCELERATOR_NAMESPACE::detail::EDMetadataSentry::EDMetadataSentry
EDMetadataSentry(edm::StreamID stream)
Definition:
EDMetadataSentry.cc:8
QueueCache.h
Generated for CMSSW Reference Manual by
1.8.14