Next: , Previous: Advanced Complex DFTs, Up: Advanced Interface


4.4.2 Advanced Real-data DFTs

     fftw_plan fftw_plan_many_dft_r2c(int rank, const int *n, int howmany,
                                      double *in, const int *inembed,
                                      int istride, int idist,
                                      fftw_complex *out, const int *onembed,
                                      int ostride, int odist,
                                      unsigned flags);
     fftw_plan fftw_plan_many_dft_c2r(int rank, const int *n, int howmany,
                                      fftw_complex *in, const int *inembed,
                                      int istride, int idist,
                                      double *out, const int *onembed,
                                      int ostride, int odist,
                                      unsigned flags);

Like fftw_plan_many_dft, these two functions add howmany, nembed, stride, and dist parameters to the fftw_plan_dft_r2c and fftw_plan_dft_c2r functions, but otherwise behave the same as the basic interface.

The interpretation of howmany, stride, and dist are the same as for fftw_plan_many_dft, above. Note that the stride and dist for the real array are in units of double, and for the complex array are in units of fftw_complex.

If an nembed parameter is NULL, it is interpreted as what it would be in the basic interface, as described in Real-data DFT Array Format. That is, for the complex array the size is assumed to be the same as n, but with the last dimension cut roughly in half. For the real array, the size is assumed to be n if the transform is out-of-place, or n with the last dimension “padded” if the transform is in-place.

If an nembed parameter is non-NULL, it is interpreted as the physical size of the corresponding array, in row-major order, just as for fftw_plan_many_dft. In this case, each dimension of nembed should be >= what it would be in the basic interface (e.g. the halved or padded n).

Arrays n, inembed, and onembed are not used after this function returns. You can safely free or reuse them.