int main(int argc, char * argv []) { test_poly(); test_utm(); test_ps(); test_lamaz(); test_lamcc(); test_alb(); perf_test_ps(); test_random_all(); if (nfail == 0) printf("%d tests passed!\n", nok); else printf("%d ok, %d failures.\n", nok, nfail); return nfail; }
/* Test and measure polynomial evaluation function. Set values of CPE and CFIX */ void run_poly(peval_fun f, char *descr, double *cpep, double *cfixp) { pfun = f; printf("Function %s\n", descr); if (test_poly(f, stdout)) { double cpe = find_cpe_full(run_fun, test_degree, 300, stdout, RAN_SAMPLE, 0.2, 0); double fix_time = measure_function(run_fun, FIXDEGREE); if (verbose) printf(" CPE = %.2f\tOverhead = %.2f\tC(%d) = %.1f\n", cpe, last_overhead, FIXDEGREE, fix_time); else printf(" CPE = %.2f\tC(%d) = %.1f\n", cpe, FIXDEGREE, fix_time); if (cpep) *cpep = cpe; if (cfixp) *cfixp = fix_time; } }