Skip to content

StdFileBackend

nphtan edited this page May 19, 2021 · 2 revisions

KokkosResilience::StdFileBackend

Standard file based backend.

Header File: StdFileBackend.hpp

Synopsis

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) {}
};

Public Members

Constructor

  • StdFileBackend(StdFileContext<StdFileBackend> &ctx, std::string const &filename);
    Create the StdFileBackend with the supplied context and filename.

Functions

  • void checkpoint(
        const std::string &label, int version,
        const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views);

    Create a checkpoint with the give label and version containing the specified Views.

  • bool restart_available(const std::string &label, int version);

    Check if a restart exists with the give label and version.

  • 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