为什么大多数FFT库都使用复杂的结构而不是两个阵列进行虚构和真实的部分
(例如音频信号是连续的数组块
我之所以问这个,是因为通常,输入数据 没有虚构的部分,我们可以直接分配或使用memcpy,这可以节省很多时间。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FFT例程,这些程序采用了某种复杂类型的数组,而不是一系列真实和一系列的想象力,以便于使用编写复杂类型的程序的方便。在为高性能编写的例程中,采用一系列真实和一系列想象力的FFT例程更为常见(由于SIMD指令和高性能FFT实现的其他方面所需的操作减少了)。
要使用纯真实的输入数据(没有虚构组件的数据),您应该寻求一个真正的复杂FFT例程,因为这通常比使用复杂的复杂性能更好 - 复杂的FFT例程,设置为零的假想组件。
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).
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.