Fast Fourier transforms on GPU on iOS

£可爱£侵袭症+ 提交于 2019-12-05 05:18:00

vDSP actually uses the builtin (from iPhone 3GS onward) NEON vector arithmetic processor, which is, as you already said a SIMD engine and is really fast for certain tasks, including FFT.

I have no experience with computing an FFT on the GPU but i doubt it will be faster as the NEON instructions in vDSP, as its only purpose are these media and signal processing related tasks.

vDSP uses Arm NEON instructions under the hood and makes using them really easy. If you want to get down and dirty you could also use the NEON instruction set manually, but i think even getting on par with vDSP runtime wise will be a challenge, especially if you only need out of the box functions like FFT.

If you want to test the NEON engine yourself there is a great benchmark as APK for Android devices which tests regular vs NEON computation. The only thing you have to notice is, that if your data is larger than the L1 Cache the L2 Cache accessing becomes the limiting factor and if you even exceed this, there wont be a noticable runtime advantage.

vDSP and Accelerate use vector instructions on the CPU to parallelize and speed up signal processing tasks.

Regarding FFT via GPGPU on iOS systems, I think there is currently no such library available. Many signal processing algorithms are implemented in the GPGPU framework GPUImage but it looks like FFT is not supported, since these algorithms are implemented with OpenGL ES 2.0 shaders. The same goes for ogles_gpgpu.

OpenGL ES 3.1 Compute Shaders are not supported on iOS systems, so you should check out Metal then.

You'll find Surge to be precisely what you need. And it's written in pure Swift!

krafter

Take a look at my answer here: https://stackoverflow.com/a/19966776/468812

Although the code in there uses FFT for audio processing, it can be applied to any signal.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!