Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: FFTW 3.3.5: Guru Complex DFTs Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42:
Chris@42:

Chris@42: Next: , Previous: , Up: Guru Interface   [Contents][Index]

Chris@42:
Chris@42:
Chris@42: Chris@42:

4.5.3 Guru Complex DFTs

Chris@42: Chris@42:
Chris@42:
fftw_plan fftw_plan_guru_dft(
Chris@42:      int rank, const fftw_iodim *dims,
Chris@42:      int howmany_rank, const fftw_iodim *howmany_dims,
Chris@42:      fftw_complex *in, fftw_complex *out,
Chris@42:      int sign, unsigned flags);
Chris@42: 
Chris@42: fftw_plan fftw_plan_guru_split_dft(
Chris@42:      int rank, const fftw_iodim *dims,
Chris@42:      int howmany_rank, const fftw_iodim *howmany_dims,
Chris@42:      double *ri, double *ii, double *ro, double *io,
Chris@42:      unsigned flags);
Chris@42: 
Chris@42: Chris@42: Chris@42: Chris@42:

These two functions plan a complex-data, multi-dimensional DFT Chris@42: for the interleaved and split format, respectively. Chris@42: Transform dimensions are given by (rank, dims) over a Chris@42: multi-dimensional vector (loop) of dimensions (howmany_rank, Chris@42: howmany_dims). dims and howmany_dims should point Chris@42: to fftw_iodim arrays of length rank and Chris@42: howmany_rank, respectively. Chris@42:

Chris@42: Chris@42:

flags is a bitwise OR (‘|’) of zero or more planner flags, Chris@42: as defined in Planner Flags. Chris@42:

Chris@42:

In the fftw_plan_guru_dft function, the pointers in and Chris@42: out point to the interleaved input and output arrays, Chris@42: respectively. The sign can be either -1 (= Chris@42: FFTW_FORWARD) or +1 (= FFTW_BACKWARD). If the Chris@42: pointers are equal, the transform is in-place. Chris@42:

Chris@42:

In the fftw_plan_guru_split_dft function, Chris@42: ri and ii point to the real and imaginary input arrays, Chris@42: and ro and io point to the real and imaginary output Chris@42: arrays. The input and output pointers may be the same, indicating an Chris@42: in-place transform. For example, for fftw_complex pointers Chris@42: in and out, the corresponding parameters are: Chris@42:

Chris@42:
Chris@42:
ri = (double *) in;
Chris@42: ii = (double *) in + 1;
Chris@42: ro = (double *) out;
Chris@42: io = (double *) out + 1;
Chris@42: 
Chris@42: Chris@42:

Because fftw_plan_guru_split_dft accepts split arrays, strides Chris@42: are expressed in units of double. For a contiguous Chris@42: fftw_complex array, the overall stride of the transform should Chris@42: be 2, the distance between consecutive real parts or between Chris@42: consecutive imaginary parts; see Guru vector and transform sizes. Note that the dimension strides are applied equally to the Chris@42: real and imaginary parts; real and imaginary arrays with different Chris@42: strides are not supported. Chris@42:

Chris@42:

There is no sign parameter in fftw_plan_guru_split_dft. Chris@42: This function always plans for an FFTW_FORWARD transform. To Chris@42: plan for an FFTW_BACKWARD transform, you can exploit the Chris@42: identity that the backwards DFT is equal to the forwards DFT with the Chris@42: real and imaginary parts swapped. For example, in the case of the Chris@42: fftw_complex arrays above, the FFTW_BACKWARD transform Chris@42: is computed by the parameters: Chris@42:

Chris@42:
Chris@42:
ri = (double *) in + 1;
Chris@42: ii = (double *) in;
Chris@42: ro = (double *) out + 1;
Chris@42: io = (double *) out;
Chris@42: 
Chris@42: Chris@42:
Chris@42:
Chris@42:

Chris@42: Next: , Previous: , Up: Guru Interface   [Contents][Index]

Chris@42:
Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: