diff peck_fft.c @ 4:2d6c49fcafcb

neon2 and neon4 support
author Peter Meerwald <p.meerwald@bct-electronic.com>
date Fri, 16 Sep 2011 14:04:19 +0200
parents cfec79393811
children c7237a7544eb
line wrap: on
line diff
--- a/peck_fft.c	Fri Sep 16 13:08:20 2011 +0200
+++ b/peck_fft.c	Fri Sep 16 14:04:19 2011 +0200
@@ -19,10 +19,10 @@
  */
 
 static void kf_bfly2(
-        peck_fft_cpx * Fout,
-        const size_t fstride,
-        const peck_fft_cfg st,
-        int m) {
+    peck_fft_cpx * Fout,
+    const size_t fstride,
+    const peck_fft_cfg st,
+    int m) {
 
 //printf("kf_bfly2\n");
 
@@ -44,10 +44,11 @@
 }
 
 static void kf_bfly4(
-        peck_fft_cpx * Fout,
-        const size_t fstride,
-        const peck_fft_cfg st,
-        const size_t m) {
+    peck_fft_cpx * Fout,
+    const size_t fstride,
+    const peck_fft_cfg st,
+    const size_t m) {
+
     peck_fft_cpx *tw1,*tw2,*tw3;
     peck_fft_cpx scratch[6];
     size_t k=m;
@@ -94,10 +95,11 @@
 }
 
 static void kf_bfly3(
-         peck_fft_cpx * Fout,
-         const size_t fstride,
-         const peck_fft_cfg st,
-         size_t m) {
+     peck_fft_cpx * Fout,
+     const size_t fstride,
+     const peck_fft_cfg st,
+     size_t m) {
+
      size_t k=m;
      const size_t m2 = 2*m;
      peck_fft_cpx *tw1, *tw2;
@@ -107,7 +109,6 @@
 
 printf("kf_bfly3\n");
 
-
      tw1=tw2=st->twiddles;
 
      do {
@@ -139,12 +140,11 @@
 }
 
 static void kf_bfly5(
-        peck_fft_cpx * Fout,
-        const size_t fstride,
-        const peck_fft_cfg st,
-        int m
-        )
-{
+    peck_fft_cpx * Fout,
+    const size_t fstride,
+    const peck_fft_cfg st,
+    int m
+    ) {
     peck_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;
     int u;
     peck_fft_cpx scratch[13];
@@ -156,7 +156,6 @@
 
 printf("kf_bfly5\n");
 
-
     Fout0=Fout;
     Fout1=Fout0+m;
     Fout2=Fout0+2*m;
@@ -164,7 +163,7 @@
     Fout4=Fout0+4*m;
 
     tw=st->twiddles;
-    for ( u=0; u<m; ++u ) {
+    for (u = 0; u < m; ++u) {
         C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
         scratch[0] = *Fout0;
 
@@ -204,13 +203,12 @@
 
 /* perform the butterfly for one stage of a mixed radix FFT */
 static void kf_bfly_generic(
-        peck_fft_cpx * Fout,
-        const size_t fstride,
-        const peck_fft_cfg st,
-        int m,
-        int p
-        )
-{
+    peck_fft_cpx * Fout,
+    const size_t fstride,
+    const peck_fft_cfg st,
+    int m,
+    int p) {
+    
     int u,k,q1,q;
     peck_fft_cpx * twiddles = st->twiddles;
     peck_fft_cpx t;
@@ -218,7 +216,6 @@
 
 printf("kf_bfly_generic\n");
 
-
     peck_fft_cpx * scratch = (peck_fft_cpx*)PECK_FFT_TMP_ALLOC(sizeof(peck_fft_cpx)*p);
 
     for ( u=0; u<m; ++u ) {

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.