* @brief Returns snapshot of current state of the reader. */
| 157 | * @brief Returns snapshot of current state of the reader. |
| 158 | */ |
| 159 | LoaderStateSnapshot GetStateSnapshot() { |
| 160 | DALI_ENFORCE(IsCheckpointingEnabled(), |
| 161 | "Checkpointing was not enabled. Please make sure you set" |
| 162 | " enable_checkpointing to True when creating the pipeline."); |
| 163 | if constexpr (!supports_checkpointing) { |
| 164 | DALI_FAIL("Checkpointing is not supported by this loader."); |
| 165 | } else { |
| 166 | return current_snapshot_; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * @brief Restores the loader's state from a snapshot. |
no outgoing calls