Chris@19: Chris@19:
Chris@19:Chris@19: Next: Guru Real-data DFTs, Chris@19: Previous: Guru vector and transform sizes, Chris@19: Up: Guru Interface Chris@19:
fftw_plan fftw_plan_guru_dft( Chris@19: int rank, const fftw_iodim *dims, Chris@19: int howmany_rank, const fftw_iodim *howmany_dims, Chris@19: fftw_complex *in, fftw_complex *out, Chris@19: int sign, unsigned flags); Chris@19: Chris@19: fftw_plan fftw_plan_guru_split_dft( Chris@19: int rank, const fftw_iodim *dims, Chris@19: int howmany_rank, const fftw_iodim *howmany_dims, Chris@19: double *ri, double *ii, double *ro, double *io, Chris@19: unsigned flags); Chris@19:Chris@19:
Chris@19: These two functions plan a complex-data, multi-dimensional DFT
Chris@19: for the interleaved and split format, respectively.
Chris@19: Transform dimensions are given by (rank
, dims
) over a
Chris@19: multi-dimensional vector (loop) of dimensions (howmany_rank
,
Chris@19: howmany_dims
). dims
and howmany_dims
should point
Chris@19: to fftw_iodim
arrays of length rank
and
Chris@19: howmany_rank
, respectively.
Chris@19:
Chris@19:
flags
is a bitwise OR (‘|’) of zero or more planner flags,
Chris@19: as defined in Planner Flags.
Chris@19:
Chris@19:
In the fftw_plan_guru_dft
function, the pointers in
and
Chris@19: out
point to the interleaved input and output arrays,
Chris@19: respectively. The sign can be either -1 (=
Chris@19: FFTW_FORWARD
) or +1 (= FFTW_BACKWARD
). If the
Chris@19: pointers are equal, the transform is in-place.
Chris@19:
Chris@19:
In the fftw_plan_guru_split_dft
function,
Chris@19: ri
and ii
point to the real and imaginary input arrays,
Chris@19: and ro
and io
point to the real and imaginary output
Chris@19: arrays. The input and output pointers may be the same, indicating an
Chris@19: in-place transform. For example, for fftw_complex
pointers
Chris@19: in
and out
, the corresponding parameters are:
Chris@19:
Chris@19:
ri = (double *) in; Chris@19: ii = (double *) in + 1; Chris@19: ro = (double *) out; Chris@19: io = (double *) out + 1; Chris@19:Chris@19:
Because fftw_plan_guru_split_dft
accepts split arrays, strides
Chris@19: are expressed in units of double
. For a contiguous
Chris@19: fftw_complex
array, the overall stride of the transform should
Chris@19: be 2, the distance between consecutive real parts or between
Chris@19: consecutive imaginary parts; see Guru vector and transform sizes. Note that the dimension strides are applied equally to the
Chris@19: real and imaginary parts; real and imaginary arrays with different
Chris@19: strides are not supported.
Chris@19:
Chris@19:
There is no sign
parameter in fftw_plan_guru_split_dft
.
Chris@19: This function always plans for an FFTW_FORWARD
transform. To
Chris@19: plan for an FFTW_BACKWARD
transform, you can exploit the
Chris@19: identity that the backwards DFT is equal to the forwards DFT with the
Chris@19: real and imaginary parts swapped. For example, in the case of the
Chris@19: fftw_complex
arrays above, the FFTW_BACKWARD
transform
Chris@19: is computed by the parameters:
Chris@19:
Chris@19:
ri = (double *) in + 1; Chris@19: ii = (double *) in; Chris@19: ro = (double *) out + 1; Chris@19: io = (double *) out; Chris@19:Chris@19: Chris@19: Chris@19: