ATLAS Offline Software
Loading...
Searching...
No Matches
AthDevice::IMemoryResourcesTool Class Referenceabstract

Interface for a tool that provides a main/device and a host memory resource. More...

#include <IMemoryResourcesTool.h>

Inheritance diagram for AthDevice::IMemoryResourcesTool:
Collaboration diagram for AthDevice::IMemoryResourcesTool:

Public Member Functions

 DeclareInterfaceID (IMemoryResourcesTool, 1, 0)
 Declare the interface that the tool will implement.
virtual ~IMemoryResourcesTool ()=default
 Destructor.
virtual std::pmr::memory_resource & mainMR () const =0
 Get the "main" / "device" std::pmr::memory_resource object.
virtual std::pmr::memory_resource * hostMR () const =0
 Get the "host" (accessible) std::pmr::memory_resource object.

Detailed Description

Interface for a tool that provides a main/device and a host memory resource.

In many situations, when a components needs to interact with a "device", it needs to manage memory both on the device and on the host. This interface is meant to simplify the setup for such components.

The API follows the logic that was adopted by Acts/traccc. That when a piece of code needs both a "device"/"main" and a "host" memory resource, the "device"/"main" one would absolutely need to exist. But the "host" one is technically optional. Such that if there is no "host" memory resource set up, that means that the "device"/"main" memory resource is one that's accessible both from the host and the device. With no explicit copies necessary bbetween the two.

Definition at line 29 of file IMemoryResourcesTool.h.

Constructor & Destructor Documentation

◆ ~IMemoryResourcesTool()

virtual AthDevice::IMemoryResourcesTool::~IMemoryResourcesTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ DeclareInterfaceID()

AthDevice::IMemoryResourcesTool::DeclareInterfaceID ( IMemoryResourcesTool ,
1 ,
0  )

Declare the interface that the tool will implement.

◆ hostMR()

virtual std::pmr::memory_resource * AthDevice::IMemoryResourcesTool::hostMR ( ) const
pure virtual

Get the "host" (accessible) std::pmr::memory_resource object.

◆ mainMR()

virtual std::pmr::memory_resource & AthDevice::IMemoryResourcesTool::mainMR ( ) const
pure virtual

Get the "main" / "device" std::pmr::memory_resource object.


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