Lines Matching refs:f
171 float (*f) (float); member
183 #define F(func, lo, hi) {#func, 'f', 0, lo, hi, {.f = func}},
228 double f; in asdouble() member
230 return u.f; in asdouble()
271 run_thruput (double f (double)) in run_thruput()
274 f (A[i]); in run_thruput()
278 runf_thruput (float f (float)) in runf_thruput()
281 f (Af[i]); in runf_thruput()
287 run_latency (double f (double)) in run_latency()
292 prev = f (A[i] + prev * z); in run_latency()
296 runf_latency (float f (float)) in runf_latency()
301 prev = f (Af[i] + prev * z); in runf_latency()
306 run_vn_thruput (__vpcs v_double f (v_double)) in run_vn_thruput()
309 f (v_double_load (A+i)); in run_vn_thruput()
313 runf_vn_thruput (__vpcs v_float f (v_float)) in runf_vn_thruput()
316 f (v_float_load (Af+i)); in runf_vn_thruput()
320 run_vn_latency (__vpcs v_double f (v_double)) in run_vn_latency()
326 prev = f (vbslq_f64 (sel, prev, v_double_load (A+i))); in run_vn_latency()
330 runf_vn_latency (__vpcs v_float f (v_float)) in runf_vn_latency()
336 prev = f (vbslq_f32 (sel, prev, v_float_load (Af+i))); in runf_vn_latency()
342 run_sv_thruput (sv_double f (sv_double, sv_bool)) in run_sv_thruput()
345 f (sv_double_load (A+i), svptrue_b64 ()); in run_sv_thruput()
349 runf_sv_thruput (sv_float f (sv_float, sv_bool)) in runf_sv_thruput()
352 f (sv_float_load (Af+i), svptrue_b32 ()); in runf_sv_thruput()
356 run_sv_latency (sv_double f (sv_double, sv_bool)) in run_sv_latency()
362 prev = f (svsel_f64 (sel, sv_double_load (A+i), prev), svptrue_b64 ()); in run_sv_latency()
366 runf_sv_latency (sv_float f (sv_float, sv_bool)) in runf_sv_latency()
372 prev = f (svsel_f32 (sel, sv_float_load (Af+i), prev), svptrue_b32 ()); in runf_sv_latency()
385 #define TIMEIT(run, f) do { \ argument
387 run (f); /* Warm up. */ \
392 run (f); \
400 bench1 (const struct fun *f, int type, double lo, double hi) in bench1() argument
407 if (f->vec == 'n') in bench1()
408 vlen = f->prec == 'd' ? v_double_len() : v_float_len(); in bench1()
409 else if (f->vec == 's') in bench1()
410 vlen = f->prec == 'd' ? sv_double_len() : sv_float_len(); in bench1()
412 if (f->prec == 'd' && type == 't' && f->vec == 0) in bench1()
413 TIMEIT (run_thruput, f->fun.d); in bench1()
414 else if (f->prec == 'd' && type == 'l' && f->vec == 0) in bench1()
415 TIMEIT (run_latency, f->fun.d); in bench1()
416 else if (f->prec == 'f' && type == 't' && f->vec == 0) in bench1()
417 TIMEIT (runf_thruput, f->fun.f); in bench1()
418 else if (f->prec == 'f' && type == 'l' && f->vec == 0) in bench1()
419 TIMEIT (runf_latency, f->fun.f); in bench1()
421 else if (f->prec == 'd' && type == 't' && f->vec == 'n') in bench1()
422 TIMEIT (run_vn_thruput, f->fun.vnd); in bench1()
423 else if (f->prec == 'd' && type == 'l' && f->vec == 'n') in bench1()
424 TIMEIT (run_vn_latency, f->fun.vnd); in bench1()
425 else if (f->prec == 'f' && type == 't' && f->vec == 'n') in bench1()
426 TIMEIT (runf_vn_thruput, f->fun.vnf); in bench1()
427 else if (f->prec == 'f' && type == 'l' && f->vec == 'n') in bench1()
428 TIMEIT (runf_vn_latency, f->fun.vnf); in bench1()
431 else if (f->prec == 'd' && type == 't' && f->vec == 's') in bench1()
432 TIMEIT (run_sv_thruput, f->fun.svd); in bench1()
433 else if (f->prec == 'd' && type == 'l' && f->vec == 's') in bench1()
434 TIMEIT (run_sv_latency, f->fun.svd); in bench1()
435 else if (f->prec == 'f' && type == 't' && f->vec == 's') in bench1()
436 TIMEIT (runf_sv_thruput, f->fun.svf); in bench1()
437 else if (f->prec == 'f' && type == 'l' && f->vec == 's') in bench1()
438 TIMEIT (runf_sv_latency, f->fun.svf); in bench1()
445 f->name, s, in bench1()
453 f->name, s, in bench1()
461 bench (const struct fun *f, double lo, double hi, int type, int gen) in bench() argument
463 if (f->prec == 'd' && gen == 'r') in bench()
465 else if (f->prec == 'd' && gen == 'l') in bench()
467 else if (f->prec == 'd' && gen == 't') in bench()
469 else if (f->prec == 'f' && gen == 'r') in bench()
471 else if (f->prec == 'f' && gen == 'l') in bench()
473 else if (f->prec == 'f' && gen == 't') in bench()
480 bench1 (f, 't', lo, hi); in bench()
483 bench1 (f, 'l', lo, hi); in bench()
487 if (f->prec == 'd') in bench()
494 bench1 (f, 't', lo, hi); in bench()
497 bench1 (f, 'l', lo, hi); in bench()
505 FILE *f = strcmp (name, "-") == 0 ? stdin : fopen (name, "r"); in readtrace() local
506 if (!f) in readtrace()
523 if (fscanf (f, "%lf", Trace + n) != 1) in readtrace()
527 if (ferror (f) || n == 0) in readtrace()
532 fclose (f); in readtrace()
547 for (const struct fun *f = funtab; f->name; f++) in usage() local
548 printf ("%7s [low: %g high: %g]\n", f->name, f->lo, f->hi); in usage()
623 for (const struct fun *f = funtab; f->name; f++) in main() local
624 if (all || strcmp (argv[0], f->name) == 0) in main()
629 lo = f->lo; in main()
630 hi = f->hi; in main()
632 bench (f, lo, hi, type, gen); in main()