Node:Guru Real-data DFTs, Next:Guru Real-to-real Transforms, Previous:Guru Complex DFTs, Up:Guru Interface
fftw_plan fftw_plan_guru_dft_r2c(int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *in, double *ro, double *io, unsigned flags); fftw_plan fftw_plan_guru_dft_c2r(int rank, const fftw_iodim *dims, int howmany_rank, const fftw_iodim *howmany_dims, double *ri, double *ii, double *out, unsigned flags);
Plan a real-input (r2c) or real-output (c2r), multi-dimensional 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. As for the basic and advanced
interfaces, an r2c transform is FFTW_FORWARD
and a c2r transform
is FFTW_BACKWARD
.
The last dimension of dims
is interpreted specially: that
dimension of the real array has size dims[rank-1].n
, but that
dimension of the complex array has size dims[rank-1].n/2+1
(division rounded down). The strides, on the other hand, are taken to
be exactly as specified (and are given in units of double
, as
usual. It is up to the user to specify the strides appropriately for
the peculiar dimensions of the data, and we do not guarantee that the
planner will succeed (return non-NULL
) for any dimensions other
than those described in Real-data DFT Array Format and generalized
in Advanced Real-data DFTs. (That is, for an in-place transform,
each individual dimension should be able to operate in place.)
in
and out
point to the real input and output arrays for
r2c and c2r transforms, respectively. ri
and ii
point to
the real and imaginary input arrays for a c2r transform, and ro
and io
point to the real and imaginary output arrays for an r2c
transform. in
and ro
or ri
and out
may be
the same, indicating an in-place transform. (See also the previous
section for use with fftw_complex
arrays.)
flags
is a bitwise OR (|
) of zero or more planner flags,
as defined in Planner Flags.
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. Moreover, we should
note that separate real and imaginary arrays, in particular, are not
supported for in-place multi-dimensional transforms (the planner will
return NULL
).