aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/fft/test.c
diff options
context:
space:
mode:
authorJames Pollard <james@pollard.dev>2020-06-12 17:48:51 +0100
committerJames Pollard <james@pollard.dev>2020-06-12 17:48:51 +0100
commitf7795011ea9ac0d34ee565d3832f15b649bf1827 (patch)
treefd731b58626c8665032afd62068ece8cedc76eb0 /benchmarks/fft/test.c
parent9acb804500b590edbff66cd802216f58dde169cd (diff)
parent86f42b92d87020875e2a7ef4ba40de12d261685f (diff)
downloadvericert-kvx-f7795011ea9ac0d34ee565d3832f15b649bf1827.tar.gz
vericert-kvx-f7795011ea9ac0d34ee565d3832f15b649bf1827.zip
Merge branch 'master' into arrays-proof
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