Octopus 16.0
real-space, real-time, TDDFT code
fftw_low.c File Reference
#include <config.h>
#include <fortran_types.h>
Include dependency graph for fftw_low.c:

Functions

void fft_optimize (int *n, int par)
 
void FC_FUNC_ (oct_fft_optimize, OCT_FFT_OPTIMIZE)
 

Function Documentation

◆ fft_optimize()

void fft_optimize ( int *  n,
int  par 
)

Optimizes the order of the FFT grid. The best FFT grid dimensions are given by 2^a*3^b*5^c*7^d*11^e*13^f 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.

◆ FC_FUNC_()

void FC_FUNC_ ( oct_fft_optimize  ,
OCT_FFT_OPTIMIZE   
)