diff peck_fft.c @ 9:8726585681f6

backup
author Peter Meerwald <p.meerwald@bct-electronic.com>
date Wed, 21 Sep 2011 12:18:40 +0200
parents 707be088ccc3
children 05f6ab0a17c0
line wrap: on
line diff
--- a/peck_fft.c	Mon Sep 19 19:49:56 2011 +0200
+++ b/peck_fft.c	Wed Sep 21 12:18:40 2011 +0200
@@ -12,12 +12,12 @@
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-
+#include "armv7_cycles.h"
 #include "_peck_fft_guts.h"
 /* The guts header contains all the multiplication and addition macros that are defined for
  * fixed or floating point complex numbers. It also delares the kf_ internal functions.
  */
-
+#if !BFLY2_ASM
 static void kf_bfly2(
     peck_fft_cpx *Fout,
     const size_t fstride,
@@ -26,11 +26,10 @@
 
 // printf("kf_bfly2, %d\n", fstride);
 
-    peck_fft_cpx *Fout2;
-    peck_fft_cpx *tw1 = st->twiddles;
-    peck_fft_cpx t;
-    Fout2 = Fout + m;
+    peck_fft_cpx * __restrict tw1 = st->twiddles;
+    peck_fft_cpx * __restrict Fout2 = Fout + m;
     do {
+        peck_fft_cpx t;
         C_MUL(t, *Fout2, *tw1);
         tw1 += fstride;
         C_SUB(*Fout2, *Fout, t);
@@ -39,6 +38,7 @@
         ++Fout;
     } while (--m);
 }
+#endif
 
 static void kf_bfly4(
     peck_fft_cpx * Fout,
@@ -264,7 +264,9 @@
 
     // recombine the p smaller DFTs 
     switch (p) {
-        case 2: kf_bfly2(Fout, fstride, st, m); break;
+        case 2: 
+            kf_bfly2(Fout, fstride, st, m); 
+            break;
         case 3: kf_bfly3(Fout, fstride, st, m); break; 
         case 4: kf_bfly4(Fout, fstride, st, m); break;
         case 5: kf_bfly5(Fout, fstride, st, m); break; 

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