ATLAS Offline Software
Loading...
Searching...
No Matches
MemoryResourcesAdaptorTool.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3//
4#ifndef ATHDEVICECOMPS_MEMORYRESOURCESADAPTORTOOL_H
5#define ATHDEVICECOMPS_MEMORYRESOURCESADAPTORTOOL_H
6
7// Framework include(s).
9#include "GaudiKernel/ToolHandle.h"
10
11// AthDevice include(s).
14
15namespace AthDevice {
16
24 : public extends<AthAlgTool, IMemoryResourcesTool> {
25
26 public:
27 // Inherit the base class's constructor(s).
28 using extends::extends;
29
32
34 virtual StatusCode initialize() override;
35
37
40
42 virtual std::pmr::memory_resource& mainMR() const override;
43
45 virtual std::pmr::memory_resource* hostMR() const override;
46
48
49 private:
51 ToolHandle<IMemoryResourceTool> m_mainMRTool{
52 this, "MainMRTool", "",
53 "Tool providing the 'main' / 'device' memory resource"};
54
55 ToolHandle<IMemoryResourceTool> m_hostMRTool{
56 this, "HostMRTool", "",
57 "Tool providing the 'host' (accessible) memory resource"};
58
59}; // class MemoryResourcesAdaptorTool
60
61} // namespace AthDevice
62
63#endif // ATHDEVICECOMPS_MEMORYRESOURCESADAPTORTOOL_H
Tool implementing AthDevice::IMemoryResourcesTool using two tools.
ToolHandle< IMemoryResourceTool > m_mainMRTool
Handle to the "main" / "device" memory resource tool.
ToolHandle< IMemoryResourceTool > m_hostMRTool
Handle to the "host" (accessible) memory resource tool.
virtual std::pmr::memory_resource * hostMR() const override
Get the "host" (accessible) std::pmr::memory_resource object.
virtual StatusCode initialize() override
Initialize the tool.
virtual std::pmr::memory_resource & mainMR() const override
Get the "main" / "device" std::pmr::memory_resource object.