aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/fft/test.c
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-06-12 13:19:18 +0100
committerYann Herklotz <git@yannherklotz.com>2020-06-12 13:19:18 +0100
commitda1b679c68c06ce1cf59df7706dcc59036872269 (patch)
tree37e2f899b717df444fd12cd5e6715b0de2aa69d2 /benchmarks/fft/test.c
parent0f9ab38389000edfa2376fabace69d2366d32647 (diff)
parent16da832b98deb028fe8248ed8ed29bfddb477124 (diff)
downloadvericert-kvx-da1b679c68c06ce1cf59df7706dcc59036872269.tar.gz
vericert-kvx-da1b679c68c06ce1cf59df7706dcc59036872269.zip
Merge branch 'master' of github.com:ymherklotz/CoqUp
Diffstat (limited to 'benchmarks/fft/test.c')
-rw-r--r--benchmarks/fft/test.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/benchmarks/fft/test.c b/benchmarks/fft/test.c
new file mode 100644
index 0000000..3717e51
--- /dev/null
+++ b/benchmarks/fft/test.c
@@ -0,0 +1,36 @@
+#include "fft.h"
+
+int main(){
+ TYPE a_x[512];
+ TYPE a_y[512];
+ int i;
+ float max, min;
+ max = 2147483646.0;
+ min = -2147483646.0;
+
+ for( i = 0; i < 512; i++){
+ a_x[i] = (TYPE)(i);//(TYPE)(((double) rand() / (RAND_MAX)) * (max-min) + min);//i;
+ a_y[i] = (TYPE)(i);//(((double) rand() / (RAND_MAX)) * (max-min) + min);//i;
+ }
+
+ printf("ORIG!\n");
+ for( i = 0; i < 512; i++){
+ printf("x = %f y = %f \n", a_x[i], a_y[i]);
+ }
+
+ fft1D_512(a_x, a_y);
+
+ printf("OUTPUT\n");
+ for( i = 0; i < 512; i++){
+ printf("x = %f y = %f \n", a_x[i], a_y[i]);
+ }
+
+ fft1D_512(a_x, a_y);
+
+ printf("NORMAL\n");
+ for( i = 0; i < 512; i++){
+ printf("x = %f y = %f \n", a_x[i]/512, a_y[i]/512);
+ }
+
+ return 0;
+} \ No newline at end of file