| 531 | { |
| 532 | template <typename ContextType> |
| 533 | void dump(std::unique_ptr<ContextType> const& context, std::unique_ptr<Bindings> const& binding, |
| 534 | ReportingOptions const& reporting, int32_t batch) |
| 535 | { |
| 536 | if (!context) |
| 537 | { |
| 538 | sample::gLogError << "Empty context! Skip printing outputs." << std::endl; |
| 539 | return; |
| 540 | } |
| 541 | if (reporting.output) |
| 542 | { |
| 543 | dumpOutputs(*context, *binding, sample::gLogInfo); |
| 544 | } |
| 545 | if (reporting.dumpRawBindings) |
| 546 | { |
| 547 | dumpRawBindingsToFiles(*context, *binding, sample::gLogInfo); |
| 548 | } |
| 549 | if (!reporting.exportOutput.empty()) |
| 550 | { |
| 551 | exportJSONOutput(*context, *binding, reporting.exportOutput, batch); |
| 552 | } |
| 553 | } |
| 554 | } // namespace details |
| 555 | |
| 556 | void printOutput(ReportingOptions const& reporting, InferenceEnvironment const& iEnv, int32_t batch) |
no test coverage detected