Skip to content
Snippets Groups Projects

FFTW grid sizes

Merged Nicolas Tancogne-Dejean requested to merge fftw_sizes into main
Files
5
+ 5
2
@@ -28,6 +28,9 @@
* where a,b,c,d are arbitrary and e,f are 0 or 1.
* (http://www.fftw.org/doc/Complex-DFTs.html)
* par is the parity: the result must satisfy n % 2 == par, provided par >= 0.
*
* NTD: To make cufft and FFTW to always give the same results, the multiples
* of 11 and 13 are not allowed.
*/
void fft_optimize(int *n, int par)
{
@@ -46,9 +49,9 @@ void fft_optimize(int *n, int par)
if(n2 % i == 0){
/* For debugging: */
/* printf("%i ", i); */
if(i > 13) break;
if(i > 7) break;
n2 = n2 / i;
if(i != 11 && i != 13) i--;
i--;
}
}
/* For debugging: */
Loading