NERSCPowering Scientific Discovery Since 1974

Differences between FFTW 3 and FFTW 2 source code

New include file name, and use of parameters from the include file.

<       include "fftw3.f"
...
>       integer fftw_fwd, fftw_bkwd, fftw_estimate
>       parameter (fftw_fwd=-1, fftw_bkwd=1, fftw_estimate=0)
...
<       print *,"fftw_fwd =      ",fftw_forward
<       print *,"fftw_bkwd =     ",fftw_backward
---
>       print *,"fftw_fwd =      ",fftw_fwd
>       print *,"fftw_bkwd =     ",fftw_bkwd

FFTW 3 plans include the input and output arrays, and the routine name includes the dimension. Also, the _f77 tag is removed from the routine names in FFTW 3.

<       call dfftw_plan_dft_1d(plan, n,in,out,fftw_forward, FFTW_ESTIMATE)
<       call dfftw_plan_dft_1d(iplan,n,out,in,fftw_backward,FFTW_ESTIMATE)
---
>       call fftw_f77_create_plan(plan,n,fftw_fwd,FFTW_ESTIMATE)
>       call fftw_f77_create_plan(iplan,n,fftw_bkwd,FFTW_ESTIMATE)

FFTW 3 executes the plans with a single function, fftw_execute, while FFTW 2 had several execution functions depending on dimension. Notice that the _f77 tags are no longer present.

<       call dfftw_execute(plan)
---
>       call fftw_f77_one(plan,in,out)
...
<       call dfftw_execute(iplan)
---
>       call fftw_f77_one(iplan,out,in)
...
<       call dfftw_destroy_plan(plan)
<       call dfftw_destroy_plan(iplan)
---
>       call fftw_f77_destroy_plan(plan)
>       call fftw_f77_destroy_plan(iplan)