starting point for radix 3

'make test' output
### testing SNR for  2187 point FFTs
#### DOUBLE
snr_t2f = 292.51
snr_f2t = 304.97
#### FLOAT
snr_t2f = 143.46
snr_f2t = 138.03
#### SHORT
snr_t2f = 49.257
snr_f2t = 16.294

#### timing 10000 x 2187 point FFTs
#### DOUBLE
Elapsed:0:05.05 user:3.60 sys:0.54
#### FLOAT
Elapsed:0:02.41 user:1.85 sys:0.23
#### SHORT
Elapsed:0:04.02 user:3.13 sys:0.08
This commit is contained in:
Mark Borgerding 2003-10-17 00:11:19 +00:00
parent d6ae498630
commit 317f11e66e
3 changed files with 48 additions and 3 deletions

View File

@ -160,6 +160,50 @@ void bfly2(
}while (--m);
}
static
inline
void bfly3(
kiss_fft_cpx * Fout,
int fstride,
const kiss_fft_state * st,
int m
)
{
const int p=3;
int u,k,q1,q;
kiss_fft_cpx * scratch = st->scratch;
kiss_fft_cpx * twiddles = st->twiddles;
kiss_fft_cpx t;
for ( u=0; u<m; ++u ) {
k=u;
for ( q1=0 ; q1<p ; ++q1 ) {
scratch[q1] = Fout[ k ];
#ifdef FIXED_POINT
scratch[q1].r /= p;
scratch[q1].i /= p;
#endif
k += m;
}
k=u;
for ( q1=0 ; q1<p ; ++q1 ) {
int twidx=0;
Fout[ k ] = scratch[0];
for (q=1;q<p;++q ) {
int Norig = st->nfft;
twidx += fstride * k;
if (twidx>=Norig) twidx-=Norig;
C_MUL(t,scratch[q] , twiddles[twidx] );
Fout[ k ].r += t.r;
Fout[ k ].i += t.i;
}
k += m;
}
}
}
static
inline
void bflyp(
@ -225,8 +269,9 @@ void fft_work(
}
switch (p) {
case 4: bfly4(Fout,fstride,st,m); break;
case 2: bfly2(Fout,fstride,st,m); break;
case 3: bfly3(Fout,fstride,st,m); break;
case 4: bfly4(Fout,fstride,st,m); break;
default: bflyp(Fout,fstride,st,m,p); break;
}
}

View File

@ -1,4 +1,4 @@
NFFT=1024
NFFT=2187
ALLUTILS=kfft kffts kfftd
NUMFFTS=10000
UTILSRC=../kiss_fft.c fftutil.c

View File

@ -1,4 +1,4 @@
NFFT=1024
NFFT=2187
ALLUTILS=kfft kffts kfftd
NUMFFTS=10000
UTILSRC=../kiss_fft.c fftutil.c