-
Notifications
You must be signed in to change notification settings - Fork 2
StdFileBackend
nphtan edited this page May 19, 2021
·
2 revisions
Standard file based backend.
Header File: StdFileBackend.hpp
class StdFileBackend {
public:
StdFileBackend(StdFileContext<StdFileBackend> &ctx,
std::string const &filename);
~StdFileBackend();
void checkpoint(
const std::string &label, int version,
const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views);
bool restart_available(const std::string &label, int version);
int latest_version(const std::string &label) const noexcept;
void restart(
const std::string &label, int version,
const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views);
void reset() {}
void register_hashes(
const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views,
const std::vector<Detail::CrefImpl> &crefs) {}
};
-
Create the
StdFileBackend(StdFileContext<StdFileBackend> &ctx, std::string const &filename);
StdFileBackend
with the supplied context and filename.
-
void checkpoint( const std::string &label, int version, const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views);
Create a checkpoint with the give
label
andversion
containing the specified Views. -
bool restart_available(const std::string &label, int version);
Check if a restart exists with the give
label
andversion
. -
int latest_version(const std::string &label) const noexcept;
Get the latest version of the specified checkpoint.
-
void restart( const std::string &label, int version, const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views);
Restart from the specified checkpoint.
-
void reset();
No-op
-
void register_hashes( const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views, const std::vector<Detail::CrefImpl> &crefs)
No-op