diff --git a/src/gretl/data_store.cpp b/src/gretl/data_store.cpp index bfbaaaf..679092f 100644 --- a/src/gretl/data_store.cpp +++ b/src/gretl/data_store.cpp @@ -7,11 +7,16 @@ #include #include "data_store.hpp" #include "state.hpp" +#include "wang_checkpoint_strategy.hpp" #include #include namespace gretl { +DataStore::DataStore(size_t checkpoint_budget) : DataStore(std::make_unique(checkpoint_budget)) +{ +} + DataStore::DataStore(std::unique_ptr strategy) : checkpointStrategy_(std::move(strategy)) { currentStep_ = 0; diff --git a/src/gretl/data_store.hpp b/src/gretl/data_store.hpp index 9e9955f..5f27bf0 100644 --- a/src/gretl/data_store.hpp +++ b/src/gretl/data_store.hpp @@ -55,6 +55,9 @@ struct defaultInitializeZeroDual { /// checkpointing state information, and its backpropagated sensitivities class DataStore { public: + /// @brief Backward-compat constructor using a Wang checkpoint budget. + explicit DataStore(size_t checkpoint_budget); + /// @brief Constructor requiring a checkpoint strategy. /// @param strategy a checkpoint strategy implementation (e.g., WangCheckpointStrategy, /// StrummWaltherCheckpointStrategy)