• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Why most fft library use Complex struct instead of two arrays for imaginary and real parts

Resolved: Why most fft library use Complex struct instead of two arrays for imaginary and real parts

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am asking this because generally, input data such as audio signals are continous array block, and before feeding them into fft routine, one has to convert structure of data from array to array of Complex(re, im) using a loop
When input data do not have imaginary part, we could directly assign or use memcpy, this would have saved lot of time.

Answer:

Why most fft library use Complex struct instead of two arrays for imaginary and real parts


FFT routines that take an array of some complex type rather than an array of reals and an array of imaginaries are generally provided for the convenience of programs written to use complex types. FFT routines that take an array of reals and an array of imaginaries are more common in routines written for high performance (due to the reduced manipulations needed in SIMD instructions and other aspects of a high-performance FFT implementation).

When input data do not have imaginary part,…


To work with pure-real input data (data that has no imaginary component), you should seek a real-to-complex FFT routine, as this will generally give better performance than using a complex-to-complex FFT routine with the imaginary components set to zeros.

If you have better answer, please add a comment about this, thank you!

c
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Input Focus between two React Components

02/04/2023

Resolved: linq2db throws exception when filtering by nested collection

02/04/2023

Resolved: Table data is coming as empty in React

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.