| 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>(); |
nothing calls this directly
no test coverage detected