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

Method GetStateSnapshot

dali/operators/reader/loader/loader.h:159–168  ·  view source on GitHub ↗

* @brief Returns snapshot of current state of the reader. */

Source from the content-addressed store, hash-verified

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.

Callers 2

SaveLoaderSnapshotMethod · 0.80
TestLoaderCheckpointingFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestLoaderCheckpointingFunction · 0.64