| 87 | |
| 88 | #ifndef BENCHMARK_EXAMPLES |
| 89 | int run_example(int argc, char **argv, std::unique_ptr<Example> example) |
| 90 | { |
| 91 | std::cout << "\n" << argv[0] << "\n\n"; |
| 92 | |
| 93 | try |
| 94 | { |
| 95 | bool status = example->do_setup(argc, argv); |
| 96 | if (!status) |
| 97 | { |
| 98 | return 1; |
| 99 | } |
| 100 | example->do_run(); |
| 101 | example->do_teardown(); |
| 102 | |
| 103 | std::cout << "\nTest passed\n"; |
| 104 | return 0; |
| 105 | } |
| 106 | #ifdef ARM_COMPUTE_CL |
| 107 | catch (cl::Error &err) |
| 108 | { |
| 109 | std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; |
| 110 | std::cerr << std::endl << "ERROR " << err.what() << "(" << err.err() << ")" << std::endl; |
| 111 | std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; |
| 112 | } |
| 113 | #endif /* ARM_COMPUTE_CL */ |
| 114 | catch (std::runtime_error &err) |
| 115 | { |
| 116 | std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; |
| 117 | std::cerr << std::endl << "ERROR " << err.what() << " " << (errno ? strerror(errno) : "") << std::endl; |
| 118 | std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; |
| 119 | } |
| 120 | |
| 121 | std::cout << "\nTest FAILED\n"; |
| 122 | |
| 123 | return -1; |
| 124 | } |
| 125 | #endif /* BENCHMARK_EXAMPLES */ |
| 126 | |
| 127 | void draw_detection_rectangle(ITensor *tensor, const DetectionWindow &rect, uint8_t r, uint8_t g, uint8_t b) |
nothing calls this directly
no test coverage detected