2
* Copyright (c) 2000 Matteo Frigo
3
* Copyright (c) 2000 Massachusetts Institute of Technology
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
/* $Id: verify.c,v 1.17 2006-01-05 03:04:27 stevenj Exp $ */
28
void verify_problem(bench_problem *p, int rounds, double tol)
33
case PROBLEM_COMPLEX: verify_dft(p, rounds, tol, &e); break;
34
case PROBLEM_REAL: verify_rdft2(p, rounds, tol, &e); break;
35
case PROBLEM_R2R: verify_r2r(p, rounds, tol, &e); break;
39
ovtpvt("%g %g %g\n", e.l, e.i, e.s);
42
void verify(const char *param, int rounds, double tol)
46
p = problem_parse(param);
47
BENCH_ASSERT(can_do(p));
52
verify_problem(p, rounds, tol);
59
static void do_accuracy(bench_problem *p, int rounds, int impulse_rounds)
65
accuracy_dft(p, rounds, impulse_rounds, t); break;
67
accuracy_rdft2(p, rounds, impulse_rounds, t); break;
69
accuracy_r2r(p, rounds, impulse_rounds, t); break;
75
t[3..5]: L1, L2, Linf backward error */
76
ovtpvt("%6.2e %6.2e %6.2e %6.2e %6.2e %6.2e\n",
77
t[0], t[1], t[2], t[3], t[4], t[5]);
80
void accuracy(const char *param, int rounds, int impulse_rounds)
83
p = problem_parse(param);
84
BENCH_ASSERT(can_do(p));
88
do_accuracy(p, rounds, impulse_rounds);