ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthCUDA
AthCUDAServices
src
PerComponentStreamTool.cxx
Go to the documentation of this file.
1
//
2
// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
//
4
5
// Local include(s).
6
#include "
PerComponentStreamTool.h
"
7
8
// System include(s).
9
#include <cassert>
10
#include <iterator>
11
12
namespace
AthCUDA
{
13
14
StatusCode
PerComponentStreamTool::initialize
() {
15
16
// Create the stream object.
17
m_stream
= std::make_unique<const Details::Stream>();
18
19
// Tell the user what happened.
20
ATH_MSG_DEBUG
(
"Initialized CUDA stream on device: "
<<
m_stream
->name());
21
22
// Return gracefully.
23
return
StatusCode::SUCCESS;
24
}
25
26
cudaStream_t
PerComponentStreamTool::stream
(
const
EventContext&)
const
{
27
28
// Get the stream corresponding to the current slot.
29
assert(
m_stream
);
30
assert(
m_stream
->stream());
31
return
m_stream
->stream();
32
}
33
34
}
// namespace AthCUDA
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
PerComponentStreamTool.h
AthCUDA::PerComponentStreamTool::stream
virtual cudaStream_t stream(const EventContext &ctx) const override
Get the CUDA stream to use.
Definition
PerComponentStreamTool.cxx:26
AthCUDA::PerComponentStreamTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
PerComponentStreamTool.cxx:14
AthCUDA::PerComponentStreamTool::m_stream
std::unique_ptr< const Details::Stream > m_stream
Single CUDA stream.
Definition
PerComponentStreamTool.h:55
AthCUDA
Definition
Info.h:14
Generated on
for ATLAS Offline Software by
1.16.1