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);
Implementations for FFT constructor/destructor and transforms.
Interface for memory buffer handling.
ippl::detail::size_type size_type
std::shared_ptr< archive_type > buffer_type
Decorator class for buffer management that adds logging capabilities to buffer operations.
LoggingBufferHandler()
Default constructor, creates an internal BufferHandler for managing buffers.
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.
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.
std::vector< LogEntry > logEntries_m
Log entries for buffer operations.