fftea icon indicating copy to clipboard operation
fftea copied to clipboard

Opengl accelerated

Open ehartford opened this issue 3 years ago • 2 comments

I would like to have GPU accelerated FFT. Is it possible? This will have applications for real time simulations and games.

ehartford avatar Oct 25 '22 09:10 ehartford

That's probably possible, but it's not something I'm going to attempt in this package.

I'd also caution against premature optimisation. Have you tried the performance tips? If you've tried those, and confirmed that FFT is still the main bottleneck in your code (don't just assume this, measure it), then it might make sense to consider further optimisations like GPU acceleration. I think it's going to be pretty difficult to do.

Do you have a specific use case in mind?

liamappelbe avatar Oct 25 '22 09:10 liamappelbe

I do have a specific use case, although there are many applications of FFT for 2D and 3D games, my specific use case is to implement Jos Stam's 2D fluid solver.

I am making a game for IOS and Android, that is underwater with realistic currents and eddies.

I can prototype it with fftea, and perhaps it will be fast enough with CPU. But, it would be ~10x faster with GPU.

ehartford avatar Oct 25 '22 19:10 ehartford