MCPcopy Create free account
hub / github.com/NVIDIA/DALI / RestoreState

Method RestoreState

dali/operators/reader/reader_op.h:119–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118
119 void RestoreState(const OpCheckpoint &cpt) override {
120 if constexpr (!supports_checkpointing) {
121 DALI_FAIL("The reader `", GetOpDisplayName(spec_, true), "` does not support checkpointing.");
122 } else {
123 DALI_ENFORCE(checkpointing_,
124 "Cannot restore the checkpoint, because "
125 "checkpointing was not enabled.");
126 auto &snapshot = cpt.CheckpointState<LoaderStateSnapshot>();
127 loader_->RestoreStateFromSnapshot(snapshot);
128 SetInitialSnapshot();
129 }
130 }
131
132 std::string SerializeCheckpoint(const OpCheckpoint &cpt) const override {
133 const auto &state = cpt.CheckpointState<LoaderStateSnapshot>();

Callers

nothing calls this directly

Calls 2

GetOpDisplayNameFunction · 0.85

Tested by

no test coverage detected