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