1#ifndef IPPL_LOGGING_BUFFER_HANDLER_H
2#define IPPL_LOGGING_BUFFER_HANDLER_H
30 template <
typename MemorySpace>
104 const std::vector<LogEntry>&
getLogs()
const;
107 std::shared_ptr<BufferHandler<MemorySpace>>
122 void logMethod(
const std::string& methodName,
123 const std::map<std::string, std::string>& parameters);
Interface for memory buffer handling.
ippl::detail::size_type size_type
std::shared_ptr< archive_type > buffer_type
typename BufferHandler< MemorySpace >::size_type size_type
LoggingBufferHandler()
Default constructor, creates an internal BufferHandler for managing buffers. This constructor also in...
buffer_type getBuffer(size_type size, double overallocation) override
Allocates or retrieves a buffer and logs the action.
std::shared_ptr< BufferHandler< MemorySpace > > handler_m
Internal handler for buffer management.
void freeAllBuffers() override
Frees all buffers and logs the action.
void logMethod(const std::string &methodName, const std::map< std::string, std::string > ¶meters)
Records a method call in the log with its parameters.
size_type getUsedSize() const override
Retrieves the total size of allocated buffers.
typename BufferHandler< MemorySpace >::buffer_type buffer_type
const std::vector< LogEntry > & getLogs() const
Retrieves the list of log entries.
size_type getFreeSize() const override
Retrieves the total size of free buffers.
void deleteAllBuffers() override
Deletes all buffers and logs the action.
int rank_m
MPI rank for identifying log sources.
void freeBuffer(buffer_type buffer) override
Frees a buffer and logs the action.
LoggingBufferHandler(std::shared_ptr< BufferHandler< MemorySpace > > handler, int rank)
Constructs a LoggingBufferHandler with an existing buffer handler.
std::vector< LogEntry > logEntries_m
Log entries for buffer operations.