ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthHIP
AthHIPComps
src
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.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 ATHHIPCOMPS_DEVICEMEMORYRESOURCETOOL_H
5
#define ATHHIPCOMPS_DEVICEMEMORYRESOURCETOOL_H
6
7
// Framework include(s).
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
10
// AthDevice include(s).
11
#include "
AthDeviceInterfaces/IMemoryResourceTool.h
"
12
13
// VecMem include(s).
14
#include <vecmem/memory/hip/device_memory_resource.hpp>
15
16
namespace
AthHIP
{
17
22
class
DeviceMemoryResourceTool
23
:
public
extends<AthAlgTool, AthDevice::IMemoryResourceTool> {
24
25
public
:
26
// Inherit the base class's constructor(s).
27
using
extends::extends;
28
31
33
virtual
StatusCode
initialize
()
override
;
34
36
39
41
virtual
std::pmr::memory_resource&
mr
()
const override
;
42
44
45
private
:
47
std::unique_ptr<std::pmr::memory_resource>
m_mr
;
48
51
53
Gaudi::Property<int>
m_deviceID
{
54
this
,
"DeviceID"
, vecmem::hip::device_memory_resource::INVALID_DEVICE,
55
"ID of the device to allocate memory on (-1 to use the default device)"
};
56
58
59
};
// class DeviceMemoryResourceTool
60
61
}
// namespace AthHIP
62
63
#endif
// ATHHIPCOMPS_DEVICEMEMORYRESOURCETOOL_H
AthAlgTool.h
IMemoryResourceTool.h
AthHIP::DeviceMemoryResourceTool
Tool providing memory resource for device memory.
Definition
AthHIP/AthHIPComps/src/DeviceMemoryResourceTool.h:23
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