]> git.pld-linux.org Git - packages/fftw3.git/blame - fftw3-chk.patch
- rel.2 - placeholder for "wisdom" files. How about create them while
[packages/fftw3.git] / fftw3-chk.patch
CommitLineData
76548cea
JB
1--- fftw-3.2/libbench2/report.c.orig 2006-12-08 19:40:41.000000000 +0100
2+++ fftw-3.2/libbench2/report.c 2008-12-01 18:21:51.300291979 +0100
3@@ -93,20 +93,24 @@
4 static void sprintf_time(double x, char *buf, int buflen)
5 {
6 #ifdef HAVE_SNPRINTF
7-# define BENCH_BUFARG buf, buflen
8+ if (x < 1.0E-6)
9+ snprintf(buf, buflen, "%.2f ns", x * 1.0E9);
10+ else if (x < 1.0E-3)
11+ snprintf(buf, buflen, "%.2f us", x * 1.0E6);
12+ else if (x < 1.0)
13+ snprintf(buf, buflen, "%.2f ms", x * 1.0E3);
14+ else
15+ snprintf(buf, buflen, "%.2f s", x);
16 #else
17-# define snprintf sprintf
18-# define BENCH_BUFARG buf
19-#endif
20 if (x < 1.0E-6)
21- snprintf(BENCH_BUFARG, "%.2f ns", x * 1.0E9);
22+ sprintf(buf, "%.2f ns", x * 1.0E9);
23 else if (x < 1.0E-3)
24- snprintf(BENCH_BUFARG, "%.2f us", x * 1.0E6);
25+ sprintf(buf, "%.2f us", x * 1.0E6);
26 else if (x < 1.0)
27- snprintf(BENCH_BUFARG, "%.2f ms", x * 1.0E3);
28+ sprintf(buf, "%.2f ms", x * 1.0E3);
29 else
30- snprintf(BENCH_BUFARG, "%.2f s", x);
31-#undef BENCH_BUFARG
32+ sprintf(buf, "%.2f s", x);
33+#endif
34 }
35
36 void report_verbose(const bench_problem *p, double *t, int st)
This page took 0.055769 seconds and 4 git commands to generate.