mirror of
https://github.com/mborgerding/kissfft.git
synced 2025-07-18 21:14:24 -04:00
added simd capability
This commit is contained in:
@ -129,8 +129,13 @@ static void kf_bfly3(
|
||||
tw1 += fstride;
|
||||
tw2 += fstride*2;
|
||||
|
||||
#ifdef USE_SIMD
|
||||
Fout[m].r = Fout->r - scratch[3].r * _mm_set1_ps(.5);
|
||||
Fout[m].i = Fout->i - scratch[3].i * _mm_set1_ps(.5);
|
||||
#else
|
||||
Fout[m].r = Fout->r - scratch[3].r/2;
|
||||
Fout[m].i = Fout->i - scratch[3].i/2;
|
||||
#endif
|
||||
|
||||
C_MULBYSCALAR( scratch[0] , epi3.i );
|
||||
|
||||
@ -326,7 +331,11 @@ kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem
|
||||
+ sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/
|
||||
|
||||
if ( lenmem==NULL ) {
|
||||
#ifdef USE_SIMD
|
||||
st = ( kiss_fft_cfg)memalign( sizeof(kiss_fft_cpx), memneeded );
|
||||
#else
|
||||
st = ( kiss_fft_cfg)malloc( memneeded );
|
||||
#endif
|
||||
}else{
|
||||
if (*lenmem >= memneeded)
|
||||
st = (kiss_fft_cfg)mem;
|
||||
|
Reference in New Issue
Block a user