92 for (f_count = 0; f_count < fstride; f_count++)
94 dst = &out[f_count * 8];
97 scratch_in[0].
r = src[0].
r + src[fstride * 4].
r;
98 scratch_in[0].
i = src[0].
i + src[fstride * 4].
i;
99 scratch_in[1].
r = src[0].
r - src[fstride * 4].
r;
100 scratch_in[1].
i = src[0].
i - src[fstride * 4].
i;
103 scratch_in[2].
r = src[fstride].
r + src[fstride * 5].
r;
104 scratch_in[2].
i = src[fstride].
i + src[fstride * 5].
i;
105 scratch_in[3].
r = src[fstride].
r - src[fstride * 5].
r;
106 scratch_in[3].
i = src[fstride].
i - src[fstride * 5].
i;
109 scratch_in[4].
r = src[fstride * 2].
r + src[fstride * 6].
r;
110 scratch_in[4].
i = src[fstride * 2].
i + src[fstride * 6].
i;
111 scratch_in[5].
r = src[fstride * 2].
r - src[fstride * 6].
r;
112 scratch_in[5].
i = src[fstride * 2].
i - src[fstride * 6].
i;
115 scratch_in[6].
r = src[fstride * 3].
r + src[fstride * 7].
r;
116 scratch_in[6].
i = src[fstride * 3].
i + src[fstride * 7].
i;
117 scratch_in[7].
r = src[fstride * 3].
r - src[fstride * 7].
r;
118 scratch_in[7].
i = src[fstride * 3].
i - src[fstride * 7].
i;
121 scratch[0] = scratch_in[0];
122 scratch[1] = scratch_in[1];
123 scratch[2] = scratch_in[2];
124 scratch[4] = scratch_in[4];
125 scratch[6] = scratch_in[6];
128 scratch[5].
r = scratch_in[5].
i;
129 scratch[5].
i = -scratch_in[5].
r;
132 scratch[3].
r = (scratch_in[3].
r + scratch_in[3].
i) * TW_81;
133 scratch[3].
i = (scratch_in[3].
i - scratch_in[3].
r) * TW_81;
136 scratch[7].
r = (scratch_in[7].
r - scratch_in[7].
i) * TW_81;
137 scratch[7].
i = (scratch_in[7].
i + scratch_in[7].
r) * TW_81;
140 scratch[8].
r = scratch[0].
r + scratch[4].
r;
141 scratch[8].
i = scratch[0].
i + scratch[4].
i;
142 scratch[9].
r = scratch[1].
r + scratch[5].
r;
143 scratch[9].
i = scratch[1].
i + scratch[5].
i;
144 scratch[10].
r = scratch[0].
r - scratch[4].
r;
145 scratch[10].
i = scratch[0].
i - scratch[4].
i;
146 scratch[11].
r = scratch[1].
r - scratch[5].
r;
147 scratch[11].
i = scratch[1].
i - scratch[5].
i;
150 scratch[12].
r = scratch[2].
r + scratch[6].
r;
151 scratch[12].
i = scratch[2].
i + scratch[6].
i;
152 scratch[13].
r = scratch[3].
r - scratch[7].
r;
153 scratch[13].
i = scratch[3].
i - scratch[7].
i;
154 scratch[14].
r = scratch[2].
r - scratch[6].
r;
155 scratch[14].
i = scratch[2].
i - scratch[6].
i;
156 scratch[15].
r = scratch[3].
r + scratch[7].
r;
157 scratch[15].
i = scratch[3].
i + scratch[7].
i;
160 scratch_out[0].
r = scratch[8].
r + scratch[12].
r;
161 scratch_out[0].
i = scratch[8].
i + scratch[12].
i;
162 scratch_out[1].
r = scratch[9].
r + scratch[13].
r;
163 scratch_out[1].
i = scratch[9].
i + scratch[13].
i;
164 scratch_out[2].
r = scratch[10].
r + scratch[14].
i;
165 scratch_out[2].
i = scratch[10].
i - scratch[14].
r;
166 scratch_out[3].
r = scratch[11].
r + scratch[15].
i;
167 scratch_out[3].
i = scratch[11].
i - scratch[15].
r;
168 scratch_out[4].
r = scratch[8].
r - scratch[12].
r;
169 scratch_out[4].
i = scratch[8].
i - scratch[12].
i;
170 scratch_out[5].
r = scratch[9].
r - scratch[13].
r;
171 scratch_out[5].
i = scratch[9].
i - scratch[13].
i;
172 scratch_out[6].
r = scratch[10].
r - scratch[14].
i;
173 scratch_out[6].
i = scratch[10].
i + scratch[14].
r;
174 scratch_out[7].
r = scratch[11].
r - scratch[15].
i;
175 scratch_out[7].
i = scratch[11].
i + scratch[15].
r;
178 dst[0] = scratch_out[0];
179 dst[1] = scratch_out[1];
180 dst[2] = scratch_out[2];
181 dst[3] = scratch_out[3];
182 dst[4] = scratch_out[4];
183 dst[5] = scratch_out[5];
184 dst[6] = scratch_out[6];
185 dst[7] = scratch_out[7];
195 else if (first_radix == 4)
197 for (f_count = fstride; f_count; f_count--)
200 scratch_in[0] = src[0];
201 scratch_in[1] = src[fstride * 1];
202 scratch_in[2] = src[fstride * 2];
203 scratch_in[3] = src[fstride * 3];
206 scratch[0].
r = scratch_in[0].
r + scratch_in[2].
r;
207 scratch[0].
i = scratch_in[0].
i + scratch_in[2].
i;
208 scratch[1].
r = scratch_in[0].
r - scratch_in[2].
r;
209 scratch[1].
i = scratch_in[0].
i - scratch_in[2].
i;
212 scratch[2].
r = scratch_in[1].
r + scratch_in[3].
r;
213 scratch[2].
i = scratch_in[1].
i + scratch_in[3].
i;
214 scratch[3].
r = scratch_in[1].
r - scratch_in[3].
r;
215 scratch[3].
i = scratch_in[1].
i - scratch_in[3].
i;
219 scratch_out[0].
r = scratch[0].
r + scratch[2].
r;
220 scratch_out[0].
i = scratch[0].
i + scratch[2].
i;
221 scratch_out[1].
r = scratch[1].
r + scratch[3].
i;
222 scratch_out[1].
i = scratch[1].
i - scratch[3].
r;
223 scratch_out[2].
r = scratch[0].
r - scratch[2].
r;
224 scratch_out[2].
i = scratch[0].
i - scratch[2].
i;
225 scratch_out[3].
r = scratch[1].
r - scratch[3].
i;
226 scratch_out[3].
i = scratch[1].
i + scratch[3].
r;
229 *dst++ = scratch_out[0];
230 *dst++ = scratch_out[1];
231 *dst++ = scratch_out[2];
232 *dst++ = scratch_out[3];
242 else if (first_radix == 2)
244 dst[0].
r = src[0].
r + src[1].
r;
245 dst[0].
i = src[0].
i + src[1].
i;
246 dst[1].
r = src[0].
r - src[1].
r;
247 dst[1].
i = src[0].
i - src[1].
i;
261 for (; stage_count > 1; stage_count--)
264 for (f_count = 0; f_count < fstride; f_count++)
266 dst = &out[f_count * (mstride * 4)];
268 for (m_count = mstride; m_count; m_count--)
271 scratch_tw[0] = tw[0];
272 scratch_tw[1] = tw[mstride * 1];
273 scratch_tw[2] = tw[mstride * 2];
274 scratch_in[0] = src[0];
275 scratch_in[1] = src[step * 1];
276 scratch_in[2] = src[step * 2];
277 scratch_in[3] = src[step * 3];
280 scratch[0] = scratch_in[0];
281 scratch[1].
r = scratch_in[1].
r * scratch_tw[0].
r - scratch_in[1].
i * scratch_tw[0].
i;
282 scratch[1].
i = scratch_in[1].
i * scratch_tw[0].
r + scratch_in[1].
r * scratch_tw[0].
i;
283 scratch[2].
r = scratch_in[2].
r * scratch_tw[1].
r - scratch_in[2].
i * scratch_tw[1].
i;
284 scratch[2].
i = scratch_in[2].
i * scratch_tw[1].
r + scratch_in[2].
r * scratch_tw[1].
i;
285 scratch[3].
r = scratch_in[3].
r * scratch_tw[2].
r - scratch_in[3].
i * scratch_tw[2].
i;
286 scratch[3].
i = scratch_in[3].
i * scratch_tw[2].
r + scratch_in[3].
r * scratch_tw[2].
i;
289 scratch[4].
r = scratch[0].
r + scratch[2].
r;
290 scratch[4].
i = scratch[0].
i + scratch[2].
i;
291 scratch[5].
r = scratch[0].
r - scratch[2].
r;
292 scratch[5].
i = scratch[0].
i - scratch[2].
i;
295 scratch[6].
r = scratch[1].
r + scratch[3].
r;
296 scratch[6].
i = scratch[1].
i + scratch[3].
i;
297 scratch[7].
r = scratch[1].
r - scratch[3].
r;
298 scratch[7].
i = scratch[1].
i - scratch[3].
i;
302 scratch_out[0].
r = scratch[4].
r + scratch[6].
r;
303 scratch_out[0].
i = scratch[4].
i + scratch[6].
i;
304 scratch_out[1].
r = scratch[5].
r + scratch[7].
i;
305 scratch_out[1].
i = scratch[5].
i - scratch[7].
r;
306 scratch_out[2].
r = scratch[4].
r - scratch[6].
r;
307 scratch_out[2].
i = scratch[4].
i - scratch[6].
i;
308 scratch_out[3].
r = scratch[5].
r - scratch[7].
i;
309 scratch_out[3].
i = scratch[5].
i + scratch[7].
r;
312 dst[0] = scratch_out[0];
313 dst[mstride * 1] = scratch_out[1];
314 dst[mstride * 2] = scratch_out[2];
315 dst[mstride * 3] = scratch_out[3];
324 twiddles += mstride * 3;
343 for (f_count = fstride; f_count; f_count--)
346 for (m_count = mstride; m_count; m_count--)
349 scratch_tw[0] = tw[0];
350 scratch_tw[1] = tw[mstride * 1];
351 scratch_tw[2] = tw[mstride * 2];
352 scratch_in[0] = src[0];
353 scratch_in[1] = src[step * 1];
354 scratch_in[2] = src[step * 2];
355 scratch_in[3] = src[step * 3];
358 scratch[0] = scratch_in[0];
359 scratch[1].
r = scratch_in[1].
r * scratch_tw[0].
r - scratch_in[1].
i * scratch_tw[0].
i;
360 scratch[1].
i = scratch_in[1].
i * scratch_tw[0].
r + scratch_in[1].
r * scratch_tw[0].
i;
361 scratch[2].
r = scratch_in[2].
r * scratch_tw[1].
r - scratch_in[2].
i * scratch_tw[1].
i;
362 scratch[2].
i = scratch_in[2].
i * scratch_tw[1].
r + scratch_in[2].
r * scratch_tw[1].
i;
363 scratch[3].
r = scratch_in[3].
r * scratch_tw[2].
r - scratch_in[3].
i * scratch_tw[2].
i;
364 scratch[3].
i = scratch_in[3].
i * scratch_tw[2].
r + scratch_in[3].
r * scratch_tw[2].
i;
367 scratch[4].
r = scratch[0].
r + scratch[2].
r;
368 scratch[4].
i = scratch[0].
i + scratch[2].
i;
369 scratch[5].
r = scratch[0].
r - scratch[2].
r;
370 scratch[5].
i = scratch[0].
i - scratch[2].
i;
373 scratch[6].
r = scratch[1].
r + scratch[3].
r;
374 scratch[6].
i = scratch[1].
i + scratch[3].
i;
375 scratch[7].
r = scratch[1].
r - scratch[3].
r;
376 scratch[7].
i = scratch[1].
i - scratch[3].
i;
380 scratch_out[0].
r = scratch[4].
r + scratch[6].
r;
381 scratch_out[0].
i = scratch[4].
i + scratch[6].
i;
382 scratch_out[1].
r = scratch[5].
r + scratch[7].
i;
383 scratch_out[1].
i = scratch[5].
i - scratch[7].
r;
384 scratch_out[2].
r = scratch[4].
r - scratch[6].
r;
385 scratch_out[2].
i = scratch[4].
i - scratch[6].
i;
386 scratch_out[3].
r = scratch[5].
r - scratch[7].
i;
387 scratch_out[3].
i = scratch[5].
i + scratch[7].
r;
390 dst[0] = scratch_out[0];
391 dst[step * 1] = scratch_out[1];
392 dst[step * 2] = scratch_out[2];
393 dst[step * 3] = scratch_out[3];
431 if (first_radix == 8)
433 for (f_count = 0; f_count < fstride; f_count++)
435 dst = &out[f_count * 8];
438 scratch_in[0].
r = src[0].
r + src[fstride * 4].
r;
439 scratch_in[0].
i = src[0].
i + src[fstride * 4].
i;
440 scratch_in[1].
r = src[0].
r - src[fstride * 4].
r;
441 scratch_in[1].
i = src[0].
i - src[fstride * 4].
i;
442 scratch_in[2].
r = src[fstride].
r + src[fstride * 5].
r;
443 scratch_in[2].
i = src[fstride].
i + src[fstride * 5].
i;
444 scratch_in[3].
r = src[fstride].
r - src[fstride * 5].
r;
445 scratch_in[3].
i = src[fstride].
i - src[fstride * 5].
i;
446 scratch_in[4].
r = src[fstride * 2].
r + src[fstride * 6].
r;
447 scratch_in[4].
i = src[fstride * 2].
i + src[fstride * 6].
i;
448 scratch_in[5].
r = src[fstride * 2].
r - src[fstride * 6].
r;
449 scratch_in[5].
i = src[fstride * 2].
i - src[fstride * 6].
i;
450 scratch_in[6].
r = src[fstride * 3].
r + src[fstride * 7].
r;
451 scratch_in[6].
i = src[fstride * 3].
i + src[fstride * 7].
i;
452 scratch_in[7].
r = src[fstride * 3].
r - src[fstride * 7].
r;
453 scratch_in[7].
i = src[fstride * 3].
i - src[fstride * 7].
i;
456 scratch[0] = scratch_in[0];
457 scratch[1] = scratch_in[1];
458 scratch[2] = scratch_in[2];
459 scratch[3].
r = (scratch_in[3].
r - scratch_in[3].
i) * TW_81;
460 scratch[3].
i = (scratch_in[3].
i + scratch_in[3].
r) * TW_81;
461 scratch[4] = scratch_in[4];
462 scratch[5].
r = -scratch_in[5].
i;
463 scratch[5].
i = scratch_in[5].
r;
464 scratch[6].
r = scratch_in[6].
r;
465 scratch[6].
i = scratch_in[6].
i;
466 scratch[7].
r = (scratch_in[7].
r + scratch_in[7].
i) * TW_81;
467 scratch[7].
i = (scratch_in[7].
i - scratch_in[7].
r) * TW_81;
470 scratch[8].
r = scratch[0].
r + scratch[4].
r;
471 scratch[8].
i = scratch[0].
i + scratch[4].
i;
472 scratch[9].
r = scratch[1].
r + scratch[5].
r;
473 scratch[9].
i = scratch[1].
i + scratch[5].
i;
474 scratch[10].
r = scratch[0].
r - scratch[4].
r;
475 scratch[10].
i = scratch[0].
i - scratch[4].
i;
476 scratch[11].
r = scratch[1].
r - scratch[5].
r;
477 scratch[11].
i = scratch[1].
i - scratch[5].
i;
480 scratch[12].
r = scratch[2].
r + scratch[6].
r;
481 scratch[12].
i = scratch[2].
i + scratch[6].
i;
482 scratch[13].
r = scratch[3].
r - scratch[7].
r;
483 scratch[13].
i = scratch[3].
i - scratch[7].
i;
484 scratch[14].
r = scratch[2].
r - scratch[6].
r;
485 scratch[14].
i = scratch[2].
i - scratch[6].
i;
486 scratch[15].
r = scratch[3].
r + scratch[7].
r;
487 scratch[15].
i = scratch[3].
i + scratch[7].
i;
490 scratch_out[0].
r = scratch[8].
r + scratch[12].
r;
491 scratch_out[0].
i = scratch[8].
i + scratch[12].
i;
492 scratch_out[1].
r = scratch[9].
r + scratch[13].
r;
493 scratch_out[1].
i = scratch[9].
i + scratch[13].
i;
494 scratch_out[2].
r = scratch[10].
r - scratch[14].
i;
495 scratch_out[2].
i = scratch[10].
i + scratch[14].
r;
496 scratch_out[3].
r = scratch[11].
r - scratch[15].
i;
497 scratch_out[3].
i = scratch[11].
i + scratch[15].
r;
498 scratch_out[4].
r = scratch[8].
r - scratch[12].
r;
499 scratch_out[4].
i = scratch[8].
i - scratch[12].
i;
500 scratch_out[5].
r = scratch[9].
r - scratch[13].
r;
501 scratch_out[5].
i = scratch[9].
i - scratch[13].
i;
502 scratch_out[6].
r = scratch[10].
r + scratch[14].
i;
503 scratch_out[6].
i = scratch[10].
i - scratch[14].
r;
504 scratch_out[7].
r = scratch[11].
r + scratch[15].
i;
505 scratch_out[7].
i = scratch[11].
i - scratch[15].
r;
508 dst[0] = scratch_out[0];
509 dst[1] = scratch_out[1];
510 dst[2] = scratch_out[2];
511 dst[3] = scratch_out[3];
512 dst[4] = scratch_out[4];
513 dst[5] = scratch_out[5];
514 dst[6] = scratch_out[6];
515 dst[7] = scratch_out[7];
525 if (stage_count == 0)
528 for (f_count = 0; f_count < 8; f_count++)
530 dst[f_count].
r *= one_by_nfft;
531 dst[f_count].
i *= one_by_nfft;
535 else if (first_radix == 4)
537 for (f_count = fstride; f_count; f_count--)
540 scratch_in[0] = src[0];
541 scratch_in[1] = src[fstride * 1];
542 scratch_in[2] = src[fstride * 2];
543 scratch_in[3] = src[fstride * 3];
546 scratch[0].
r = scratch_in[0].
r + scratch_in[2].
r;
547 scratch[0].
i = scratch_in[0].
i + scratch_in[2].
i;
548 scratch[1].
r = scratch_in[0].
r - scratch_in[2].
r;
549 scratch[1].
i = scratch_in[0].
i - scratch_in[2].
i;
552 scratch[2].
r = scratch_in[1].
r + scratch_in[3].
r;
553 scratch[2].
i = scratch_in[1].
i + scratch_in[3].
i;
554 scratch[3].
r = scratch_in[1].
r - scratch_in[3].
r;
555 scratch[3].
i = scratch_in[1].
i - scratch_in[3].
i;
558 scratch_out[0].
r = scratch[0].
r + scratch[2].
r;
559 scratch_out[0].
i = scratch[0].
i + scratch[2].
i;
560 scratch_out[1].
r = scratch[1].
r - scratch[3].
i;
561 scratch_out[1].
i = scratch[1].
i + scratch[3].
r;
562 scratch_out[2].
r = scratch[0].
r - scratch[2].
r;
563 scratch_out[2].
i = scratch[0].
i - scratch[2].
i;
564 scratch_out[3].
r = scratch[1].
r + scratch[3].
i;
565 scratch_out[3].
i = scratch[1].
i - scratch[3].
r;
568 *dst++ = scratch_out[0];
569 *dst++ = scratch_out[1];
570 *dst++ = scratch_out[2];
571 *dst++ = scratch_out[3];
581 if (stage_count == 0)
584 for (f_count = 0; f_count < 4; f_count++)
586 dst[f_count].
r *= one_by_nfft;
587 dst[f_count].
i *= one_by_nfft;
591 else if (first_radix == 2)
593 dst[0].
r = (src[0].
r + src[1].
r) * one_by_nfft;
594 dst[0].
i = (src[0].
i + src[1].
i) * one_by_nfft;
595 dst[1].
r = (src[0].
r - src[1].
r) * one_by_nfft;
596 dst[1].
i = (src[0].
i - src[1].
i) * one_by_nfft;
610 for (; stage_count > 1; stage_count--)
613 for (f_count = 0; f_count < fstride; f_count++)
615 dst = &out[f_count * (mstride * 4)];
617 for (m_count = mstride; m_count ; m_count --)
620 scratch_tw[0] = tw[0];
621 scratch_tw[1] = tw[mstride * 1];
622 scratch_tw[2] = tw[mstride * 2];
623 scratch_in[0] = src[0];
624 scratch_in[1] = src[step * 1];
625 scratch_in[2] = src[step * 2];
626 scratch_in[3] = src[step * 3];
629 scratch[0] = scratch_in[0];
630 scratch[1].
r = scratch_in[1].
r * scratch_tw[0].
r + scratch_in[1].
i * scratch_tw[0].
i;
631 scratch[1].
i = scratch_in[1].
i * scratch_tw[0].
r - scratch_in[1].
r * scratch_tw[0].
i;
632 scratch[2].
r = scratch_in[2].
r * scratch_tw[1].
r + scratch_in[2].
i * scratch_tw[1].
i;
633 scratch[2].
i = scratch_in[2].
i * scratch_tw[1].
r - scratch_in[2].
r * scratch_tw[1].
i;
634 scratch[3].
r = scratch_in[3].
r * scratch_tw[2].
r + scratch_in[3].
i * scratch_tw[2].
i;
635 scratch[3].
i = scratch_in[3].
i * scratch_tw[2].
r - scratch_in[3].
r * scratch_tw[2].
i;
638 scratch[4].
r = scratch[0].
r + scratch[2].
r;
639 scratch[4].
i = scratch[0].
i + scratch[2].
i;
640 scratch[5].
r = scratch[0].
r - scratch[2].
r;
641 scratch[5].
i = scratch[0].
i - scratch[2].
i;
644 scratch[6].
r = scratch[1].
r + scratch[3].
r;
645 scratch[6].
i = scratch[1].
i + scratch[3].
i;
646 scratch[7].
r = scratch[1].
r - scratch[3].
r;
647 scratch[7].
i = scratch[1].
i - scratch[3].
i;
650 scratch_out[0].
r = scratch[4].
r + scratch[6].
r;
651 scratch_out[0].
i = scratch[4].
i + scratch[6].
i;
652 scratch_out[1].
r = scratch[5].
r - scratch[7].
i;
653 scratch_out[1].
i = scratch[5].
i + scratch[7].
r;
654 scratch_out[2].
r = scratch[4].
r - scratch[6].
r;
655 scratch_out[2].
i = scratch[4].
i - scratch[6].
i;
656 scratch_out[3].
r = scratch[5].
r + scratch[7].
i;
657 scratch_out[3].
i = scratch[5].
i - scratch[7].
r;
660 dst[0] = scratch_out[0];
661 dst[mstride * 1] = scratch_out[1];
662 dst[mstride * 2] = scratch_out[2];
663 dst[mstride * 3] = scratch_out[3];
672 twiddles += mstride * 3;
691 for (f_count = 0; f_count < fstride; f_count++)
694 for (m_count = mstride; m_count; m_count--)
697 scratch_tw[0] = tw[0];
698 scratch_tw[1] = tw[mstride * 1];
699 scratch_tw[2] = tw[mstride * 2];
700 scratch_in[0] = src[0];
701 scratch_in[1] = src[step * 1];
702 scratch_in[2] = src[step * 2];
703 scratch_in[3] = src[step * 3];
706 scratch[0] = scratch_in[0];
707 scratch[1].
r = scratch_in[1].
r * scratch_tw[0].
r + scratch_in[1].
i * scratch_tw[0].
i;
708 scratch[1].
i = scratch_in[1].
i * scratch_tw[0].
r - scratch_in[1].
r * scratch_tw[0].
i;
709 scratch[2].
r = scratch_in[2].
r * scratch_tw[1].
r + scratch_in[2].
i * scratch_tw[1].
i;
710 scratch[2].
i = scratch_in[2].
i * scratch_tw[1].
r - scratch_in[2].
r * scratch_tw[1].
i;
711 scratch[3].
r = scratch_in[3].
r * scratch_tw[2].
r + scratch_in[3].
i * scratch_tw[2].
i;
712 scratch[3].
i = scratch_in[3].
i * scratch_tw[2].
r - scratch_in[3].
r * scratch_tw[2].
i;
715 scratch[4].
r = scratch[0].
r + scratch[2].
r;
716 scratch[4].
i = scratch[0].
i + scratch[2].
i;
717 scratch[5].
r = scratch[0].
r - scratch[2].
r;
718 scratch[5].
i = scratch[0].
i - scratch[2].
i;
721 scratch[6].
r = scratch[1].
r + scratch[3].
r;
722 scratch[6].
i = scratch[1].
i + scratch[3].
i;
723 scratch[7].
r = scratch[1].
r - scratch[3].
r;
724 scratch[7].
i = scratch[1].
i - scratch[3].
i;
728 scratch_out[0].
r = (scratch[4].
r + scratch[6].
r) * one_by_nfft;
729 scratch_out[0].
i = (scratch[4].
i + scratch[6].
i) * one_by_nfft;
730 scratch_out[1].
r = (scratch[5].
r - scratch[7].
i) * one_by_nfft;
731 scratch_out[1].
i = (scratch[5].
i + scratch[7].
r) * one_by_nfft;
732 scratch_out[2].
r = (scratch[4].
r - scratch[6].
r) * one_by_nfft;
733 scratch_out[2].
i = (scratch[4].
i - scratch[6].
i) * one_by_nfft;
734 scratch_out[3].
r = (scratch[5].
r + scratch[7].
i) * one_by_nfft;
735 scratch_out[3].
i = (scratch[5].
i - scratch[7].
r) * one_by_nfft;
738 dst[0] = scratch_out[0];
739 dst[step * 1] = scratch_out[1];
740 dst[step * 2] = scratch_out[2];
741 dst[step * 3] = scratch_out[3];
762 dst[0].
r = tdc.
r + tdc.
i;
763 dst[ncfft].
r = tdc.
r - tdc.
i;
764 dst[ncfft].
i = dst[0].
i = 0;
766 for (k = 1; k <= ncfft / 2 ; ++k)
769 fpnk.
r = src[ncfft - k].
r;
770 fpnk.
i = - src[ncfft - k].
i;
772 f1k.
r = fpk.
r + fpnk.
r;
773 f1k.
i = fpk.
i + fpnk.
i;
775 f2k.
r = fpk.
r - fpnk.
r;
776 f2k.
i = fpk.
i - fpnk.
i;
778 tw.
r = f2k.
r * (twiddles[k - 1]).r - f2k.
i * (twiddles[k - 1]).i;
779 tw.
i = f2k.
r * (twiddles[k - 1]).i + f2k.
i * (twiddles[k - 1]).r;
781 dst[k].
r = (f1k.
r + tw.
r) * 0.5f;
782 dst[k].
i = (f1k.
i + tw.
i) * 0.5f;
783 dst[ncfft - k].
r = (f1k.
r - tw.
r) * 0.5f;
784 dst[ncfft - k].
i = (tw.
i - f1k.
i) * 0.5f;
798 dst[0].
r = (src[0].
r + src[ncfft].
r) * 0.5f;
799 dst[0].
i = (src[0].
r - src[ncfft].
r) * 0.5f;
801 for (k = 1; k <= ncfft / 2; k++)
804 fnkc.
r = src[ncfft - k].
r;
805 fnkc.
i = -src[ncfft - k].
i;
807 fek.
r = fk.
r + fnkc.
r;
808 fek.
i = fk.
i + fnkc.
i;
810 tmp.
r = fk.
r - fnkc.
r;
811 tmp.
i = fk.
i - fnkc.
i;
813 fok.
r = tmp.
r * twiddles[k - 1].
r + tmp.
i * twiddles[k - 1].
i;
814 fok.
i = tmp.
i * twiddles[k - 1].
r - tmp.
r * twiddles[k - 1].
i;
816 dst[k].
r = (fek.
r + fok.
r) * 0.5f;
817 dst[k].
i = (fek.
i + fok.
i) * 0.5f;
819 dst[ncfft - k].
r = (fek.
r - fok.
r) * 0.5f;
820 dst[ncfft - k].
i = (fok.
i - fek.
i) * 0.5f;
899 switch (algorithm_flag)
927 #if (NE10_UNROLL_LEVEL == 0) 988 for (; stage_count > 0; stage_count --)
990 cur_radix = factors[2 * stage_count];
991 fstride /= cur_radix;
992 mstride = factors[2 * stage_count + 1];
993 for (j = 0; j < mstride; j++)
995 for (k = 1; k < cur_radix; k++)
997 phase = -2 * pi * fstride * k * j / ncfft;
1002 twiddles += mstride * (cur_radix - 1);
1006 for (j = 0; j < ncfft / 2; j++)
1047 #endif // NE10_UNROLL_LEVEL #define NE10_FFT_ALG_DEFAULT
ne10_int32_t is_backward_scaled
Flag to control scaling behaviour in backward floating point complex FFT.
void ne10_mixed_radix_generic_butterfly_inverse_float32_c(ne10_fft_cpx_float32_t *Fout, const ne10_fft_cpx_float32_t *Fin, const ne10_int32_t *factors, const ne10_fft_cpx_float32_t *twiddles, ne10_fft_cpx_float32_t *buffer, const ne10_int32_t is_scaled)
void ne10_fft_c2r_1d_float32_c(ne10_float32_t *fout, ne10_fft_cpx_float32_t *fin, ne10_fft_r2c_cfg_float32_t cfg)
Specific implementation of ne10_fft_c2r_1d_float32 using plain C.
ne10_fft_r2c_cfg_float32_t ne10_fft_alloc_r2c_float32(ne10_int32_t nfft)
Creates a configuration structure for variants of ne10_fft_r2c_1d_float32 and ne10_fft_c2r_1d_float32...
#define NE10_MAXFACTORS
Structure for the floating point FFT function.
ne10_int32_t ne10_factor(ne10_int32_t n, ne10_int32_t *facbuf, ne10_int32_t ne10_factor_flags)
Structure for the floating point FFT state.
#define NE10_FFT_BYTE_ALIGNMENT
ne10_fft_state_float32_t * ne10_fft_cfg_float32_t
Configuration structure for floating point FFT.
#define NE10_PI
NE10 defines a number of macros for use in its function signatures.
ne10_fft_cpx_float32_t * twiddles
ne10_fft_cpx_float32_t * twiddles
ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32_c(ne10_int32_t nfft)
Specific implementation of ne10_fft_alloc_c2c_float32 for ne10_fft_c2c_1d_float32_c.
ne10_fft_cpx_float32_t * super_twiddles
void ne10_fft_c2c_1d_float32_c(ne10_fft_cpx_float32_t *fout, ne10_fft_cpx_float32_t *fin, ne10_fft_cfg_float32_t cfg, ne10_int32_t inverse_fft)
Specific implementation of ne10_fft_c2c_1d_float32 using plain C.
#define NE10_FACTOR_EIGHT_FIRST_STAGE
ne10_fft_cpx_float32_t * ne10_fft_generate_twiddles_float32(ne10_fft_cpx_float32_t *twiddles, const ne10_int32_t *factors, const ne10_int32_t nfft)
#define NE10_BYTE_ALIGNMENT(address, alignment)
void ne10_mixed_radix_generic_butterfly_float32_c(ne10_fft_cpx_float32_t *Fout, const ne10_fft_cpx_float32_t *Fin, const ne10_int32_t *factors, const ne10_fft_cpx_float32_t *twiddles, ne10_fft_cpx_float32_t *buffer, const ne10_int32_t is_scaled)
void ne10_fft_r2c_1d_float32_c(ne10_fft_cpx_float32_t *fout, ne10_float32_t *fin, ne10_fft_r2c_cfg_float32_t cfg)
Specific implementation of ne10_fft_r2c_1d_float32 using plain C.
ne10_fft_cpx_float32_t * buffer
ne10_fft_cpx_float32_t * buffer
ne10_int32_t is_forward_scaled
Flag to control scaling behaviour in forward floating point complex FFT.
#define NE10_FACTOR_DEFAULT
ne10_fft_r2c_state_float32_t * ne10_fft_r2c_cfg_float32_t