ATLAS Offline Software
Loading...
Searching...
No Matches
IMemoryMonitorSvc.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 ATHDEVICEINTERFACES_IMEMORYMONITORSVC_H
5#define ATHDEVICEINTERFACES_IMEMORYMONITORSVC_H
6
7// Framework include(s).
8#include "GaudiKernel/IService.h"
9
10// VecMem include(s).
11#include <vecmem/utils/copy.hpp>
12
13// System include(s).
14#include <cstddef>
15#include <string>
16
17namespace AthDevice {
18
20class IMemoryMonitorSvc : virtual public IService {
21
22 public:
25
27 virtual ~IMemoryMonitorSvc() = default;
28
31
33 virtual void memoryAllocated(const std::string& component,
34 const std::string& device,
35 std::size_t bytes) = 0;
37 virtual void memoryDeallocated(const std::string& component,
38 const std::string& device,
39 std::size_t bytes) = 0;
40
42
45
47 virtual void memoryCopied(const std::string& component,
48 vecmem::copy::type::copy_type type,
49 std::size_t bytes) = 0;
50
52
53}; // class IMemoryMonitorSvc
54
55} // namespace AthDevice
56
57#endif // ATHDEVICEINTERFACES_IMEMORYMONITORSVC_H
Interface to a service that provides "device memory monitoring".
virtual void memoryAllocated(const std::string &component, const std::string &device, std::size_t bytes)=0
Notify the service that a memory allocation has been made.
virtual ~IMemoryMonitorSvc()=default
Destructor.
virtual void memoryDeallocated(const std::string &component, const std::string &device, std::size_t bytes)=0
Notify the service that a memory deallocation has been made.
DeclareInterfaceID(IMemoryMonitorSvc, 1, 0)
Declare the interface that the service will implement.
virtual void memoryCopied(const std::string &component, vecmem::copy::type::copy_type type, std::size_t bytes)=0
Notify the service that a memory copy has been made.