|
GridFire v0.7.6rc4.0
General Purpose Nuclear Network
|
Abstract base struct for engine scratchpad memory. More...
#include <scratchpad_abstract.h>
Public Member Functions | |
| virtual | ~AbstractScratchPad ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual bool | is_initialized () const =0 |
| Check whether the scratchpad has been properly initialized. | |
| virtual std::unique_ptr< AbstractScratchPad > | clone () const =0 |
| Create a deep copy of this scratchpad. | |
Abstract base struct for engine scratchpad memory.
AbstractScratchPad defines the interface for temporary working memory containers used by computational engines. Implementations should provide storage for intermediate results, cached values, or pre-allocated buffers that persist across multiple computational steps.
This interface enables polymorphic handling of different scratchpad types while ensuring proper resource management through virtual destruction and deep cloning capabilities.
|
virtualdefault |
Virtual destructor for proper cleanup of derived classes.
Ensures that resources held by concrete scratchpad implementations are properly released when the scratchpad is destroyed through a base class pointer.
|
nodiscardpure virtual |
Create a deep copy of this scratchpad.
Produces an independent clone of the scratchpad, including all internal state and allocated memory. This is essential for parallel execution scenarios where each thread requires its own working memory.
Implemented in gridfire::engine::scratch::AdaptiveEngineViewScratchPad, gridfire::engine::scratch::DefinedEngineViewScratchPad, gridfire::engine::scratch::GraphEngineScratchPad, and gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad.
|
nodiscardpure virtual |
Check whether the scratchpad has been properly initialized.
Derived classes should return true only after all necessary memory allocations and setup operations have been completed successfully.
Implemented in gridfire::engine::scratch::AdaptiveEngineViewScratchPad, gridfire::engine::scratch::DefinedEngineViewScratchPad, gridfire::engine::scratch::GraphEngineScratchPad, and gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad.