快速傅立叶变换
我需要将两个多项式相乘,每个多项式都有小的积分系数。我需要一个 C/C++ 中的快速 FFT 例程来对它们进行卷积。我见过几个库,但它们似乎太大了,分布在多个文件中。重要的是我需要的代码不太长,并且可以很容易地在单个 .c/.cpp
文件中使用和编译。
- FFT 至少应该针对实际输入进行优化(如果不是小整数的话)。
- Radix 4 实现(如果可用)也可以。
- 编译它不应该采用特殊的编译标志,因为程序的编译必须在我无法控制的外部环境中完成。
此处非常符合我的需求。但我需要两倍的速度。
I need to multiply two polynomials each having small integral coefficients. I need a fast FFT routine in C/C++ which can convolve them. I have seen several libraries but they seem to be too large spread over multiple files. What is important is I need code which is not too long and can be very easily used and compiled in a single .c/.cpp
file.
- FFT should be optimized for real inputs at least if not small integers.
- Radix 4 implementation if available would be fine too.
- Compiling it should take no special compilation flags as compilation of program has to be done in external environment which I can't control.
One that very well matches my needs is here. But I need something twice as fast.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于直接且易于使用的 FFT 实现,请尝试 KissFFT。如果您需要绝对的最高性能,并且不介意一点复杂性,那么它必须是 FFTW。
For a straightforward and easy to use FFT implementation try KissFFT. If you need absolute maximum performance though, and don't mind a little complexity, then it has to be FFTW.
我收集了一些适合或大部分适合问题(C/C++ FFT)的热门搜索结果,并且我通常将它们从简单到复杂进行组织:
请随意添加或更新列表。
I've collected some of my top search results that fit or mostly fit the question (C/C++ FFT), and I've generally organized them from simple to complex:
Feel free to add to or update the list.
我已将 DspDimension 上的示例中的
smbFft
函数改编为我的过去的需要。I've adapted the
smbFft
function from this example on DspDimension to my needs in the past.