ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthHIP
AthHIPComps
src
AthHIP/AthHIPComps/src/AsyncCopyTool.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 "
AsyncCopyTool.h
"
7
8
// VecMem include(s).
9
#include <vecmem/utils/hip/async_copy.hpp>
10
11
namespace
AthHIP
{
12
13
StatusCode
AsyncCopyTool::initialize
() {
14
15
// Retrieve the stream tool.
16
ATH_CHECK
(
m_streamTool
.retrieve());
17
18
// Return gracefully.
19
return
StatusCode::SUCCESS;
20
}
21
22
std::shared_ptr<const vecmem::copy>
AsyncCopyTool::copy
(
23
const
EventContext& ctx)
const
{
24
25
// Create an asynchronous copy object, specific to this slot's HIP stream.
26
return
std::make_shared<const vecmem::hip::async_copy>(
27
m_streamTool
->stream(ctx));
28
}
29
30
}
// namespace AthHIP
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
AsyncCopyTool.h
AthHIP::AsyncCopyTool::m_streamTool
ToolHandle< IStreamTool > m_streamTool
Tool to get the current HIP stream from.
Definition
AthHIP/AthHIPComps/src/AsyncCopyTool.h:45
AthHIP::AsyncCopyTool::copy
virtual std::shared_ptr< const vecmem::copy > copy(const EventContext &ctx) const override
Get the provided vecmem::copy object.
Definition
AthHIP/AthHIPComps/src/AsyncCopyTool.cxx:22
AthHIP::AsyncCopyTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
AthHIP/AthHIPComps/src/AsyncCopyTool.cxx:13
AthHIP
Definition
AthHIP/AthHIPComps/src/AsyncCopyTool.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0