![]() |
ATLAS Offline Software
|
Interface for a tool that provides a main/device and a host memory resource. More...
#include <IMemoryResourcesTool.h>
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. | |
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.
|
virtualdefault |
Destructor.
| AthDevice::IMemoryResourcesTool::DeclareInterfaceID | ( | IMemoryResourcesTool | , |
| 1 | , | ||
| 0 | ) |
Declare the interface that the tool will implement.
|
pure virtual |
Get the "host" (accessible) std::pmr::memory_resource object.
|
pure virtual |
Get the "main" / "device" std::pmr::memory_resource object.