Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:Chris@82: Next: Real-data DFT Array Format, Previous: Planner Flags, Up: Basic Interface [Contents][Index]
Chris@82:fftw_plan fftw_plan_dft_r2c_1d(int n0, Chris@82: double *in, fftw_complex *out, Chris@82: unsigned flags); Chris@82: fftw_plan fftw_plan_dft_r2c_2d(int n0, int n1, Chris@82: double *in, fftw_complex *out, Chris@82: unsigned flags); Chris@82: fftw_plan fftw_plan_dft_r2c_3d(int n0, int n1, int n2, Chris@82: double *in, fftw_complex *out, Chris@82: unsigned flags); Chris@82: fftw_plan fftw_plan_dft_r2c(int rank, const int *n, Chris@82: double *in, fftw_complex *out, Chris@82: unsigned flags); Chris@82:
Plan a real-input/complex-output discrete Fourier transform (DFT) in
Chris@82: zero or more dimensions, returning an fftw_plan
(see Using Plans).
Chris@82:
Once you have created a plan for a certain transform type and Chris@82: parameters, then creating another plan of the same type and parameters, Chris@82: but for different arrays, is fast and shares constant data with the Chris@82: first plan (if it still exists). Chris@82:
Chris@82:The planner returns NULL
if the plan cannot be created. A
Chris@82: non-NULL
plan is always returned by the basic interface unless
Chris@82: you are using a customized FFTW configuration supporting a restricted
Chris@82: set of transforms, or if you use the FFTW_PRESERVE_INPUT
flag
Chris@82: with a multi-dimensional out-of-place c2r transform (see below).
Chris@82:
rank
is the rank of the transform (it should be the size of the
Chris@82: array *n
), and can be any non-negative integer. (See Complex Multi-Dimensional DFTs, for the definition of “rank”.) The
Chris@82: ‘_1d’, ‘_2d’, and ‘_3d’ planners correspond to a
Chris@82: rank
of 1
, 2
, and 3
, respectively. The rank
Chris@82: may be zero, which is equivalent to a rank-1 transform of size 1, i.e. a
Chris@82: copy of one real number (with zero imaginary part) from input to output.
Chris@82:
Chris@82: n0
, n1
, n2
, or n[0..rank-1]
, (as appropriate
Chris@82: for each routine) specify the size of the transform dimensions. They
Chris@82: can be any positive integer. This is different in general from the
Chris@82: physical array dimensions, which are described in Real-data DFT Array Format.
Chris@82:
Chris@82: in
and out
point to the input and output arrays of the
Chris@82: transform, which may be the same (yielding an in-place transform).
Chris@82:
Chris@82: These arrays are overwritten during planning, unless
Chris@82: FFTW_ESTIMATE
is used in the flags. (The arrays need not be
Chris@82: initialized, but they must be allocated.) For an in-place transform, it
Chris@82: is important to remember that the real array will require padding,
Chris@82: described in Real-data DFT Array Format.
Chris@82:
Chris@82:
Chris@82: flags
is a bitwise OR (‘|’) of zero or more planner flags,
Chris@82: as defined in Planner Flags.
Chris@82:
Chris@82: The inverse transforms, taking complex input (storing the non-redundant Chris@82: half of a logically Hermitian array) to real output, are given by: Chris@82:
Chris@82:fftw_plan fftw_plan_dft_c2r_1d(int n0, Chris@82: fftw_complex *in, double *out, Chris@82: unsigned flags); Chris@82: fftw_plan fftw_plan_dft_c2r_2d(int n0, int n1, Chris@82: fftw_complex *in, double *out, Chris@82: unsigned flags); Chris@82: fftw_plan fftw_plan_dft_c2r_3d(int n0, int n1, int n2, Chris@82: fftw_complex *in, double *out, Chris@82: unsigned flags); Chris@82: fftw_plan fftw_plan_dft_c2r(int rank, const int *n, Chris@82: fftw_complex *in, double *out, Chris@82: unsigned flags); Chris@82:
The arguments are the same as for the r2c transforms, except that the Chris@82: input and output data formats are reversed. Chris@82:
Chris@82:FFTW computes an unnormalized transform: computing an r2c followed by a
Chris@82: c2r transform (or vice versa) will result in the original data
Chris@82: multiplied by the size of the transform (the product of the logical
Chris@82: dimensions).
Chris@82:
Chris@82: An r2c transform produces the same output as a FFTW_FORWARD
Chris@82: complex DFT of the same input, and a c2r transform is correspondingly
Chris@82: equivalent to FFTW_BACKWARD
. For more information, see What FFTW Really Computes.
Chris@82:
Chris@82: Next: Real-data DFT Array Format, Previous: Planner Flags, Up: Basic Interface [Contents][Index]
Chris@82: