FFT: Fix false assert at the last loop
authorPhil.Wang <phil.wang@arm.com>
Wed, 24 Dec 2014 09:21:47 +0000 (17:21 +0800)
committerPhil.Wang <phil.wang@arm.com>
Mon, 29 Dec 2014 04:10:55 +0000 (12:10 +0800)
Change-Id: I9954b32f4dafd4eed63db98a24cd47cabe9c1b3d

modules/dsp/NE10_fft_generic_float32.neonintrinsic.cpp

index 804e6d6..e1bc7a9 100644 (file)
@@ -855,12 +855,13 @@ static void ne10_mixed_radix_generic_butterfly_float32_neon_impl (CPLX *Fout,
     }
     radix = factors[ stage_count << 1 ];
 
-    // radix of first stage, should be one of {2,3,5,4}
-    assert ((radix > 1) && (radix < 6));
-
     // other stages
     while (stage_count > 0)
     {
+
+        // radix of first stage, should be one of {2,3,5,4}
+        assert ((radix > 1) && (radix < 6));
+
         ne10_swap_ptr (buffer, Fout);
 
         fstride /= radix;
@@ -889,8 +890,6 @@ static void ne10_mixed_radix_generic_butterfly_float32_neon_impl (CPLX *Fout,
 
         stage_count--;
         radix = factors[ stage_count << 1 ];
-
-        assert ((radix > 1) && (radix < 6));
     } // while (stage_count)
 }