ATLAS Offline Software
Loading...
Searching...
No Matches
AthCUDA::ManagedMemoryResourceTool Class Reference

Tool providing memory resource for managed host/device memory. More...

#include <ManagedMemoryResourceTool.h>

Inheritance diagram for AthCUDA::ManagedMemoryResourceTool:
Collaboration diagram for AthCUDA::ManagedMemoryResourceTool:

Public Member Functions

Function(s) inherited from @c AthAlgTool
virtual StatusCode initialize () override
 Initialize the tool.
Function(s) inherited from @c AthDevice::IMemoryResourceTool
virtual std::pmr::memory_resource & mr () const override

Private Attributes

std::unique_ptr< std::pmr::memory_resource > m_mr
 The memory resource that this tool uses.

Detailed Description

Tool providing memory resource for managed host/device memory.

Making use of vecmem::cuda::managed_memory_resource.

Definition at line 19 of file ManagedMemoryResourceTool.h.

Member Function Documentation

◆ initialize()

StatusCode AthCUDA::ManagedMemoryResourceTool::initialize ( )
overridevirtual

Initialize the tool.

Definition at line 16 of file ManagedMemoryResourceTool.cxx.

16 {
17
18 // Construct the appropriate memory resource.
19 m_mr = std::make_unique<vecmem::cuda::managed_memory_resource>();
20
21 // Return gracefully.
22 return StatusCode::SUCCESS;
23}
std::unique_ptr< std::pmr::memory_resource > m_mr
The memory resource that this tool uses.

◆ mr()

std::pmr::memory_resource & AthCUDA::ManagedMemoryResourceTool::mr ( ) const
overridevirtual

Definition at line 25 of file ManagedMemoryResourceTool.cxx.

25 {
26
27 assert(m_mr);
28 return *m_mr;
29}

Member Data Documentation

◆ m_mr

std::unique_ptr<std::pmr::memory_resource> AthCUDA::ManagedMemoryResourceTool::m_mr
private

The memory resource that this tool uses.

Definition at line 43 of file ManagedMemoryResourceTool.h.


The documentation for this class was generated from the following files: