MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / test_evaluate

Function test_evaluate

tests/checkasm/lls.c:64–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64static void test_evaluate(LLSModel *lls, const double *param, int order)
65{
66 double refprod, newprod, eps;
67 declare_func_float(double, LLSModel *, const double *, int);
68
69 refprod = call_ref(lls, param, order);
70 newprod = call_new(lls, param, order);
71
72 eps = FFMAX(2 * DBL_EPSILON * fabs(refprod), 0.2);
73
74 if (!double_near_abs_eps(refprod, newprod, eps)) {
75 fprintf(stderr, "%- .12f - %- .12f = % .12g\n",
76 refprod, newprod, refprod - newprod);
77 fail();
78 }
79
80 if (order == lls->indep_count)
81 bench_new(lls, param, order);
82}
83
84void checkasm_check_lls(void)
85{

Callers 1

checkasm_check_llsFunction · 0.85

Calls 2

fabsFunction · 0.85
double_near_abs_epsFunction · 0.85

Tested by

no test coverage detected