ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthDevice
AthDeviceComps
src
MemoryResourcesAdaptorTool.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 "
MemoryResourcesAdaptorTool.h
"
7
8
namespace
AthDevice
{
9
10
StatusCode
MemoryResourcesAdaptorTool::initialize
() {
11
12
// Retrieve the sub-tool(s).
13
ATH_CHECK
(
m_mainMRTool
.retrieve());
14
ATH_CHECK
(
15
m_hostMRTool
.retrieve(DisableTool{m_hostMRTool.typeAndName().empty()}));
16
17
// Return gracefully.
18
return
StatusCode::SUCCESS;
19
}
20
21
std::pmr::memory_resource&
MemoryResourcesAdaptorTool::mainMR
()
const
{
22
23
return
m_mainMRTool
->mr();
24
}
25
26
std::pmr::memory_resource*
MemoryResourcesAdaptorTool::hostMR
()
const
{
27
28
return
m_hostMRTool
.isEnabled() ? &(
m_hostMRTool
->mr()) :
nullptr
;
29
}
30
31
}
// namespace AthDevice
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
MemoryResourcesAdaptorTool.h
AthDevice::MemoryResourcesAdaptorTool::m_mainMRTool
ToolHandle< IMemoryResourceTool > m_mainMRTool
Handle to the "main" / "device" memory resource tool.
Definition
MemoryResourcesAdaptorTool.h:51
AthDevice::MemoryResourcesAdaptorTool::m_hostMRTool
ToolHandle< IMemoryResourceTool > m_hostMRTool
Handle to the "host" (accessible) memory resource tool.
Definition
MemoryResourcesAdaptorTool.h:55
AthDevice::MemoryResourcesAdaptorTool::hostMR
virtual std::pmr::memory_resource * hostMR() const override
Get the "host" (accessible) std::pmr::memory_resource object.
Definition
MemoryResourcesAdaptorTool.cxx:26
AthDevice::MemoryResourcesAdaptorTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
MemoryResourcesAdaptorTool.cxx:10
AthDevice::MemoryResourcesAdaptorTool::mainMR
virtual std::pmr::memory_resource & mainMR() const override
Get the "main" / "device" std::pmr::memory_resource object.
Definition
MemoryResourcesAdaptorTool.cxx:21
AthDevice
Definition
BinaryPageMemoryResourceSvc.cxx:15
Generated on
for ATLAS Offline Software by
1.16.1