I have four cufftHandles, and I use cufftPlanMany to initialize each of them (together).
I'm using cufftGetSizeMany() to estimate the memory required for each one of them.
Lets say that s0 is the size of the first one, s1 is the size of the second one, and so on.
I do the fft and ifft using those four plans, then at the end I destroy all of them together.
My question is, is the actual total memory required for those four plans equals
total_size = s0 + s1 + s2 + s3
,
or
total_size = max(s0, s1, s2, s3)
Please note that I use each one of them at a time, but I plan all of them together at the beginning, and destroy all of them together at the end.