VkFFT
                                
                                 VkFFT copied to clipboard
                                
                                    VkFFT copied to clipboard
                            
                            
                            
                        Windowing
Thanks very much for VkFFT! I've been using it successfully on Ubunutu 22.04.1 on a Pi4. Other than enabling dtoverlay=vc4-kms-v3d-pi4 I didn't need to do anything special, the Ubuntu provided mesa-vulkan-drivers package 22.0.5 worked great. I did notice I had to use aligned_alloc() for best performance.
Are there any future plans, to do have the shader do windowing as well? On the Pi4 every little bit helps.
I see that is should be possible to do C2R (I'm doing this on the CPU at the moment, then converting to dB), though I don't fully understand how do it via VkFFT yet - is it currently possible to do while maintaining a 1D layout? On the Pi4 every memcpy() hurts quite a bit, so I'm hoping to avoid as many padding/rearranging operations as I can.
Hello,
Thanks for your interest in VkFFT!
There is zero-padding support in VkFFT already, you may check the documentation on how it works. I believe with it it is possible to do various types of windowing.
If your initial data layout is padded for C2R/R2C, there is no need to do additional transfers. Padding requirement arises from the mismatch of input/output layouts - for N-length input VkFFT only stores N/2+1 complex values due to the Hermitian symmetry of the output, but N/2+1 complex values take a different amount of space than N real values. The same is true for all other FFT libraries. You can also read more about this and issues that arise due to this in the documentation.
Best regards, Dmitrii