19#include "../../base/base_uses.f90"
24 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'fft_lib'
26 INTEGER,
SAVE :: fft_type = 0
31 PUBLIC :: fft_alloc, fft_dealloc
45 CHARACTER(len=*),
INTENT(IN) :: fftlib
76 CHARACTER(LEN=*),
INTENT(IN) :: fftlib
77 INTEGER,
INTENT(IN) :: plan_style
78 CHARACTER(LEN=*),
INTENT(IN) :: wisdom_file
81 SELECT CASE (fft_type)
83 cpabort(
"fft_do_init")
99 CHARACTER(LEN=*),
INTENT(IN) :: wisdom_file
100 LOGICAL,
INTENT(IN) :: ionode
101 LOGICAL,
INTENT(IN),
OPTIONAL :: export_wisdom
103 SELECT CASE (fft_type)
105 cpabort(
"fft_do_cleanup")
120 INTEGER,
DIMENSION(*) :: data
121 INTEGER,
INTENT(INOUT) :: max_length
141 LOGICAL,
INTENT(IN) :: fft_in_place
142 INTEGER,
INTENT(IN) :: fsign
143 INTEGER,
DIMENSION(3),
INTENT(IN) :: n
144 COMPLEX(KIND=dp),
DIMENSION(*),
INTENT(INOUT) :: zin, zout
147 plan%fft_in_place = fft_in_place
152 IF (fft_type == 3)
THEN
171 SUBROUTINE fft_3d(plan, scale, zin, zout, stat)
173 REAL(kind=
dp),
INTENT(IN) :: scale
174 COMPLEX(KIND=dp),
DIMENSION(*),
INTENT(INOUT) :: zin, zout
175 INTEGER,
INTENT(OUT) :: stat
178 IF (plan%n_3d(1)*plan%n_3d(2)*plan%n_3d(3) > 0)
THEN
179 SELECT CASE (fft_type)
183 CALL fftsg3d(plan%fft_in_place, stat, scale, plan%n_3d, zin, zout)
185 CALL fftw33d(plan, scale, zin, zout, stat)
214 INTEGER,
INTENT(IN) :: fsign
215 LOGICAL,
INTENT(IN) :: trans_in, trans_out
216 INTEGER,
INTENT(IN) :: ldx_in, ldx_out, n, m
217 COMPLEX(KIND=dp),
DIMENSION(*),
INTENT(IN) :: zin, zout
220 plan%trans_in = trans_in
221 plan%trans_out = trans_out
222 IF (plan%trans_in)
THEN
229 IF (plan%trans_out)
THEN
230 plan%ldx_out = ldx_out
233 plan%ldx_out = ldx_out
242 IF ((fft_type == 3) .AND. (n*m /= 0))
THEN
260 IF (plan%valid .AND. fft_type == 3)
THEN
275 SUBROUTINE fft_1d(plan, zin, zout, scale, stat)
277 COMPLEX(KIND=dp),
DIMENSION(*),
INTENT(INOUT) :: zin, zout
278 REAL(kind=
dp),
INTENT(IN) :: scale
279 INTEGER,
INTENT(OUT) :: stat
282 IF (plan%n*plan%m > 0)
THEN
283 SELECT CASE (fft_type)
287 CALL fftsg1dm(stat, plan%trans_in, plan%trans_out, plan%n, plan%m, &
288 plan%ldx_in, plan%ldy_in, plan%ldx_out, plan%ldy_out, zin, zout, scale)
290 CALL fftw31dm(plan, zin, zout, scale, stat)
Defines the basic variable types.
integer, parameter, public dp
subroutine, public fft_3d(plan, scale, zin, zout, stat)
...
subroutine, public fft_destroy_plan(plan)
...
integer function, public fft_library(fftlib)
Interface to FFT libraries.
subroutine, public fft_1d(plan, zin, zout, scale, stat)
...
subroutine, public fft_do_cleanup(wisdom_file, ionode, export_wisdom)
...
subroutine, public fft_create_plan_1d(plan, fsign, trans_in, trans_out, ldx_in, ldx_out, n, m, zin, zout)
...
subroutine, public fft_do_init(fftlib, plan_style, wisdom_file)
...
subroutine, public fft_get_lengths(data, max_length)
...
subroutine, public fft_create_plan_3d(plan, fft_in_place, fsign, n, zin, zout)
...
logical function, public fft_supports_arbitrary_lengths()
Query whether the active FFT backend supports arbitrary transform lengths.
Type to store data about a (1D or 3D) FFT, including FFTW plan.
subroutine, public fftsg_do_init()
...
subroutine, public fftsg1dm(fsign, trans_in, trans_out, n, m, ldx_in, ldy_in, ldx_out, ldy_out, zin, zout, scale)
...
subroutine, public fftsg_do_cleanup()
...
subroutine, public fftsg3d(fft_in_place, fsign, scale, n, zin, zout)
...
subroutine, public fftw3_do_cleanup(wisdom_file, ionode, export_wisdom)
...
subroutine, public fftw3_destroy_plan(plan)
...
subroutine, public fftw3_get_lengths(data, max_length)
...
subroutine, public fftw3_create_plan_1d(plan, zin, zout)
...
subroutine, public fftw3_create_plan_3d(plan, zin, zout)
...
subroutine, public fftw33d(plan, scale, zin, zout, stat)
...
subroutine, public fftw3_do_init(wisdom_file, plan_style)
...
subroutine, public fftw31dm(plan, zin, zout, scale, stat)
...