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

Function ClearOutputs

dali/pipeline/executor/executor_impl.cc:76–84  ·  view source on GitHub ↗

* @brief Reset the outputs held in the workspace, releasing the current memory and setting the * effective batch size to 0 for every output. */

Source from the content-addressed store, hash-verified

74 * effective batch size to 0 for every output.
75 */
76void ClearOutputs(Workspace &ws, const OpSpec &spec) {
77 for (int i = 0; i < spec.NumOutput(); i++) {
78 if (ws.template OutputIsType<CPUBackend>(i)) {
79 ws.template Output<CPUBackend>(i).Reset();
80 } else {
81 ws.template Output<GPUBackend>(i).Reset();
82 }
83 }
84}
85
86} // namespace
87

Callers 1

RunHelperMethod · 0.85

Calls 2

NumOutputMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected