static int metric_summary (kap_config_t *kc, kap_personality_t *p, perf_metric_t * m, const char *l, int ao, FILE *fptr) { double t = 0.0f; double b = 0.0f; VAC_t results = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; reduce_results (m, &results); if (results.count == 0.0f) return 0; t = results.count / (results.accum/1000000.0); if (ao) { b = ((results.count) * (double) kc->value_size) / (results.accum / 1000000.0); } if (p->rank == 0) perf_report (&results, t, b, l, ao, fptr); return 0; }
int main(int argc, char* argv[]) { win_new(); glfwSetWindowTitle("font_perf"); // font_set_color(1, 1, 1, 0); perf_init(); // main loop glClearColor(0.3f, 0.3f, 0.3f, 1.0f); while(1) { perf_mark_beg("glClear"); glClear(GL_COLOR_BUFFER_BIT); perf_mark_end("glClear"); perf_mark_beg("ortho"); glMatrixMode(GL_PROJECTION); glLoadIdentity(); int l = 0; int r = win_width(); int b = 0; int t = win_height(); gluOrtho2D(l, r, b, t); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); perf_mark_end("ortho"); // draw bitmap letter // perf_mark_beg("draw_letter"); // int i; // for(i = 0; i < 50; ++i) { draw_letter(); // } // perf_mark_end("draw_letter"); // font_draw(100, 100, "bitchin camaro!"); perf_mark_beg("swap"); glfwSwapBuffers(); perf_mark_end("swap"); if(!glfwGetWindowParam(GLFW_OPENED)) break; // fps_inc_frames_drawn(); perf_report(); } perf_terminate(); glfwTerminate(); return 0; }
void check_correctness() { const prb_t p(dims, dir, dt, tag, axis, group); char pstr[max_prb_len]; prb2str(&p, pstr); if (pattern && !match_regex(pstr, pattern)) return; print(1, "run: %s\n", pstr); res_t res{}; const int status = shuffle::doit(&p, &res); bool want_perf_report = false; parse_result(res, want_perf_report, allow_unimpl, status, pstr); if (want_perf_report && bench_mode & PERF) perf_report(&p, &res, pstr); benchdnn_stat.tests++; }
void check_correctness(const desc_t *c) { const prb_t p(*c, dir, cfg, alg, attr, mb); char pstr[max_prb_len]; prb2str(&p, pstr); if (pattern && !match_regex(pstr, pattern)) return; print(1, "run: %s\n", pstr); res_t res{}; const int status = conv::doit(&p, &res); (void)status; bool want_perf_report = false; parse_result(res, want_perf_report, allow_unimpl, status, pstr); if (want_perf_report && bench_mode & PERF) perf_report(&p, &res, pstr); benchdnn_stat.tests++; }