Node:Guru Complex DFTs, Next:Guru Real-data DFTs, Previous:Guru vector and transform sizes, Up:Guru Interface
fftw_plan fftw_plan_guru_dft(int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *ro, double *io, unsigned flags);
Plan a complex-data, multi-dimensional FFTW_FORWARD
DFT with
transform dimensions given by (rank
, dims
) over a
multi-dimensional vector (loop) of dimensions (howmany_rank
,
howmany_dims
). dims
and howmany_dims
should point
to fftw_iodim
arrays of length rank
and
howmany_rank
, respectively.
ri
and ii
point to the real and imaginary input arrays,
and ro
and io
point to the real and imaginary output
arrays. The input and output pointers may be the same, indicating an
in-place transform. For example, for fftw_complex
pointers
in
and out
, the corresponding parameters are:
ri = (double *) in; ii = (double *) in + 1; ro = (double *) out; io = (double *) out + 1;
For a contiguous fftw_complex
array, the overall stride of the
transform should be 2, the distance between consecutive real parts or
between consecutive imaginary parts; see Guru vector and transform sizes. Note that the dimension strides are applied equally to the real
and imaginary parts; real and imaginary arrays with different strides
are not supported.
flags
is a bitwise OR (|
) of zero or more planner flags,
as defined in Planner Flags.
To perform an FFTW_BACKWARD
transform, one can exploit the
identity that the backwards DFT is equal to the forwards DFT with the
real and imaginary parts swapped. For example, in the case of the
fftw_complex
arrays above, the FFTW_BACKWARD
transform is
computed by the parameters:
ri = (double *) in + 1; ii = (double *) in; ro = (double *) out + 1; io = (double *) out;
Although this interface permits more flexible complex-number formats,
such as separate real and imaginary arrays, we recommend the interleaved
fftw_complex
format for optimal performance.