MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / run_example

Function run_example

utils/Utils.cpp:89–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88#ifndef BENCHMARK_EXAMPLES
89int 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
127void draw_detection_rectangle(ITensor *tensor, const DetectionWindow &rect, uint8_t r, uint8_t g, uint8_t b)

Callers

nothing calls this directly

Calls 5

errMethod · 0.80
do_setupMethod · 0.45
do_runMethod · 0.45
do_teardownMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected