VkFFT icon indicating copy to clipboard operation
VkFFT copied to clipboard

c2r/r2c memory layout

Open wangii opened this issue 4 years ago • 2 comments

Hi, could you explain or point out the location of the in-place c2r/r2c memory layout of the computation result? There is a comment on performR2C saying the memory layout on github, but I couldn't find it. thanks!

wangii avatar Aug 18 '21 13:08 wangii

Hello,

I am currently writing documentation for VkFFT, so I will copy the part about this issue here:

One of the main use cases of strides comes to solve the R2C/C2R Hermitian symmetry H stride mismatch - for real space, it is equal to Nx real elements and for the frequency space, it is equal to floor(Nx/2)+1 complex numbers. So, with strides it is possible to use a buffer, padded to 2*(floor(Nx/2)+1) real elements in H stride (all elements between Nx and 2*(floor(Nx/2)+1) will not be read so it does not matter what data is there before the write stage). All other strides are done as a multiplication between previous stride and number of elements in the previous axis. These are the default values of R2C/C2R strides in in-place, if they are not explicitly specified.

Best regards, Dmitrii Tolmachev

DTolm avatar Aug 18 '21 14:08 DTolm

Got it, thanks!

wangii avatar Aug 18 '21 15:08 wangii