ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthHIP
AthHIPComps
src
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.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 "
DeviceMemoryResourceTool.h
"
7
8
// System include(s).
9
#include <cassert>
10
11
namespace
AthHIP
{
12
13
StatusCode
DeviceMemoryResourceTool::initialize
() {
14
15
// Construct the appropriate memory resource.
16
m_mr
= std::make_unique<vecmem::hip::device_memory_resource>(
m_deviceID
);
17
18
// Return gracefully.
19
return
StatusCode::SUCCESS;
20
}
21
22
std::pmr::memory_resource&
DeviceMemoryResourceTool::mr
()
const
{
23
24
assert(
m_mr
);
25
return
*
m_mr
;
26
}
27
28
}
// namespace AthHIP
DeviceMemoryResourceTool.h
AthHIP::DeviceMemoryResourceTool::mr
virtual std::pmr::memory_resource & mr() const override
Get the provided std::pmr::memory_resource object.
Definition
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.cxx:22
AthHIP::DeviceMemoryResourceTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.cxx:13
AthHIP::DeviceMemoryResourceTool::m_deviceID
Gaudi::Property< int > m_deviceID
Device to allocate memory on.
Definition
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.h:53
AthHIP::DeviceMemoryResourceTool::m_mr
std::unique_ptr< std::pmr::memory_resource > m_mr
The memory resource that this tool uses.
Definition
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.h:47
AthHIP
Definition
AthHIP/AthHIPComps/src/AsyncCopyTool.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0