| 554 | } // namespace details |
| 555 | |
| 556 | void printOutput(ReportingOptions const& reporting, InferenceEnvironment const& iEnv, int32_t batch) |
| 557 | { |
| 558 | auto const& binding = iEnv.bindings.at(0); |
| 559 | if (!binding) |
| 560 | { |
| 561 | sample::gLogError << "Empty bindings! Skip printing outputs." << std::endl; |
| 562 | return; |
| 563 | } |
| 564 | |
| 565 | if (iEnv.safe) |
| 566 | { |
| 567 | auto const& context = iEnv.safeContexts.at(0); |
| 568 | details::dump(context, binding, reporting, batch); |
| 569 | } |
| 570 | else |
| 571 | { |
| 572 | auto const& context = iEnv.contexts.at(0); |
| 573 | details::dump(context, binding, reporting, batch); |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | } // namespace sample |