68 template<
int RADIX,
bool is_first_stage,
bool is_inverse,
bool is_scaled>
80 for (f_count = fstride; f_count > 0; f_count--)
82 for (m_count = out_step; m_count > 0; m_count--)
88 NE10_LOAD_BY_STEP <RADIX> (scratch_in, Fin, in_step);
93 NE10_CONJ<RADIX> (scratch_in);
99 NE10_SCALED<RADIX> (scratch_in, RADIX);
111 FFT_MUL_TW<RADIX> (scratch, scratch_in, scratch_tw);
114 NE10_LOAD_BY_STEP<RADIX> (scratch_in, scratch, 1);
119 FFT_FCU<RADIX> (scratch_out, scratch_in);
124 NE10_CONJ<RADIX> (scratch_out);
128 NE10_STORE_BY_STEP<RADIX> (Fout, scratch_out, out_step);
145 twiddles -= out_step;
147 Fout += (RADIX - 1) * out_step;
164 template<
bool is_inverse,
bool is_scaled>
180 for (; f_count > 0; f_count--)
183 for (q1 = 0; q1 < radix; q1++)
185 scratch[q1] = Fin[in_step * q1];
188 scratch[q1].
i = -scratch[q1].
i;
197 for (q1 = 0; q1 < radix; q1++)
200 Fout[q1 * out_step] = scratch[0];
201 for (q = 1; q < radix; q++)
213 Fout[q1 * out_step].
i = -Fout[q1 * out_step].
i;
234 template<
bool is_inverse,
bool is_scaled>
246 stage_count = factors[0];
247 fstride = factors[1];
249 radix = factors[stage_count << 1];
250 nfft = fstride * radix;
252 if (stage_count % 2 == 0)
261 ne10_radix_butterfly_int32_c<2, true, is_inverse, is_scaled> (Fout, Fin,
266 ne10_radix_butterfly_int32_c<4, true, is_inverse, is_scaled> (Fout, Fin,
271 ne10_radix_butterfly_int32_c<3, true, is_inverse, is_scaled> (Fout, Fin,
276 ne10_radix_butterfly_int32_c<5, true, is_inverse, is_scaled> (Fout, Fin,
281 ne10_radix_generic_butterfly_int32_c<is_inverse, is_scaled> (Fout, Fin,
299 while (stage_count > 0)
305 radix = factors[stage_count << 1];
306 assert ((radix > 1) && (radix < 6));
312 ne10_radix_butterfly_int32_c<2, false, is_inverse, is_scaled> (Fout,
313 buffer, twiddles, fstride, mstride, nfft);
316 ne10_radix_butterfly_int32_c<3, false, is_inverse, is_scaled> (Fout,
317 buffer, twiddles, fstride, mstride, nfft);
320 ne10_radix_butterfly_int32_c<4, false, is_inverse, is_scaled> (Fout,
321 buffer, twiddles, fstride, mstride, nfft);
324 ne10_radix_butterfly_int32_c<5, false, is_inverse, is_scaled> (Fout,
325 buffer, twiddles, fstride, mstride, nfft);
329 twiddles += mstride * (radix - 1);
350 const bool is_inverse =
false;
353 const bool is_scaled_flag =
true;
355 is_scaled_flag> (Fout, Fin, factors, twiddles, buffer);
359 const bool is_scaled_flag =
false;
361 is_scaled_flag> (Fout, Fin, factors, twiddles, buffer);
382 const bool is_inverse =
true;
385 const bool is_scaled_flag =
true;
387 is_scaled_flag> (Fout, Fin, factors, twiddles, buffer);
391 const bool is_scaled_flag =
false;
393 is_scaled_flag> (Fout, Fin, factors, twiddles, buffer);
void ne10_mixed_radix_generic_butterfly_int32_impl_c(ne10_fft_cpx_int32_t *Fout, const ne10_fft_cpx_int32_t *Fin, const ne10_int32_t *factors, const ne10_fft_cpx_int32_t *twiddles, ne10_fft_cpx_int32_t *buffer)
Generic FFT function for 32-bit fixed point.
#define ne10_swap_ptr(X, Y)
void ne10_mixed_radix_generic_butterfly_int32_c(ne10_fft_cpx_int32_t *Fout, const ne10_fft_cpx_int32_t *Fin, const ne10_int32_t *factors, const ne10_fft_cpx_int32_t *twiddles, ne10_fft_cpx_int32_t *buffer, const ne10_int32_t is_scaled)
Generic (forward) FFT function for 32-bit fixed point.
void ne10_radix_butterfly_int32_c(ne10_fft_cpx_int32_t *Fout, const ne10_fft_cpx_int32_t *Fin, const ne10_fft_cpx_int32_t *twiddles, const ne10_int32_t fstride, const ne10_int32_t out_step, const ne10_int32_t nfft)
Generic butterfly function for 32-bit fixed point.
#define NE10_CPX_ADDTO(Z, X)
#define NE10_F2I32_FIXDIV(c, div)
void ne10_mixed_radix_generic_butterfly_inverse_int32_c(ne10_fft_cpx_int32_t *Fout, const ne10_fft_cpx_int32_t *Fin, const ne10_int32_t *factors, const ne10_fft_cpx_int32_t *twiddles, ne10_fft_cpx_int32_t *buffer, const ne10_int32_t is_scaled)
Generic IFFT function for 32-bit fixed point.
Structure for the 32-bit fixed point FFT function.
void NE10_LOAD_BY_STEP(T out[RADIX], const T *Fin, const ne10_int32_t in_step)
Load a fixed-size array from given buffer, by given step.
#define NE10_CPX_MUL_F32(Z, A, B)