ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthCUDA
AthCUDAServices
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/cuda/async_copy.hpp>
10
11
namespace
AthCUDA
{
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 CUDA stream.
26
return
std::make_shared<const vecmem::cuda::async_copy>(
27
m_streamTool
->stream(ctx));
28
}
29
30
}
// namespace AthCUDA
AsyncCopyTool.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
AthCUDA::AsyncCopyTool::copy
virtual std::shared_ptr< const vecmem::copy > copy(const EventContext &ctx) const override
Get the provided vecmem::copy object.
Definition
AsyncCopyTool.cxx:22
AthCUDA::AsyncCopyTool::m_streamTool
ToolHandle< IStreamTool > m_streamTool
Tool to get the current CUDA stream from.
Definition
AsyncCopyTool.h:45
AthCUDA::AsyncCopyTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
AsyncCopyTool.cxx:13
AthCUDA
Definition
Info.h:14
Generated on
for ATLAS Offline Software by
1.16.1