[pypy-commit] extradoc extradoc: C runner for FFT

hakanardo noreply at buildbot.pypy.org
Wed Aug 15 09:53:51 CEST 2012


Author: Hakan Ardo <hakan at debian.org>
Branch: extradoc
Changeset: r4581:516332eeeeb0
Date: 2012-08-15 09:53 +0200
http://bitbucket.org/pypy/extradoc/changeset/516332eeeeb0/

Log:	C runner for FFT

diff --git a/talk/iwtc11/benchmarks/benchmark.sh b/talk/iwtc11/benchmarks/benchmark.sh
--- a/talk/iwtc11/benchmarks/benchmark.sh
+++ b/talk/iwtc11/benchmarks/benchmark.sh
@@ -23,6 +23,8 @@
     ./runner.py -n 5 -c "$*" scimark/run_MonteCarlo.c 268435456
     ./runner.py -n 5 -c "$*" scimark/run_LU.c 100 4096
     ./runner.py -n 5 -c "$*" scimark/run_LU.c 1000 2
+    ./runner.py -n 5 -c "$* -lm" scimark/run_FFT.c 1024 32768
+    ./runner.py -n 5 -c "$* -lm" scimark/run_FFT.c 1048576 2
     rm a.out
 elif [[ "$1" == luajit* ]]; then
     $* runner.lua sqrt int
@@ -82,4 +84,6 @@
     $* ./runner.py $EXTRA_OPTS scimark.py MonteCarlo 268435456
     $* ./runner.py $EXTRA_OPTS scimark.py LU 100 4096
     $* ./runner.py $EXTRA_OPTS scimark.py LU 1000 2
+    $* ./runner.py $EXTRA_OPTS scimark.py FFT 1024 32768
+    $* ./runner.py $EXTRA_OPTS scimark.py FFT 1048576 2
 fi
diff --git a/talk/iwtc11/benchmarks/runall.sh b/talk/iwtc11/benchmarks/runall.sh
--- a/talk/iwtc11/benchmarks/runall.sh
+++ b/talk/iwtc11/benchmarks/runall.sh
@@ -13,4 +13,5 @@
 ./benchmark.sh luajit-2.0.0-beta10
 ./benchmark.sh luajit-2.0.0-beta10 -O-loop
 ./benchmark.sh luajit-master
+./benchmark.sh luajit-master -O-loop
 ./benchmark.sh luajit
diff --git a/talk/iwtc11/benchmarks/scimark/run_FFT.c b/talk/iwtc11/benchmarks/scimark/run_FFT.c
new file mode 100644
--- /dev/null
+++ b/talk/iwtc11/benchmarks/scimark/run_FFT.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <assert.h>
+
+#include "Random.c"
+#include "FFT.c"
+
+int main(int ac, char **av) {
+    assert(ac==3);
+    int N = atoi(av[1]);
+    int cycles = atoi(av[2]);
+    int twoN = 2*N;
+    Random R = new_Random_seed(7);
+    double *x = RandomVector(twoN, R);
+    int i=0;
+
+    for (i=0; i<cycles; i++)
+    {
+        FFT_transform(twoN, x);     /* forward transform */
+        FFT_inverse(twoN, x);       /* backward transform */
+    }
+
+
+    fprintf(stderr, "FFT(%d,%d):    ", N, cycles);
+    return 0;
+}
+
+


More information about the pypy-commit mailing list