d@0: d@0: d@0: Advanced Complex DFTs - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: Next: , d@0: Previous: Advanced Interface, d@0: Up: Advanced Interface d@0:


d@0:
d@0: d@0:

4.4.1 Advanced Complex DFTs

d@0: d@0:
     fftw_plan fftw_plan_many_dft(int rank, const int *n, int howmany,
d@0:                                   fftw_complex *in, const int *inembed,
d@0:                                   int istride, int idist,
d@0:                                   fftw_complex *out, const int *onembed,
d@0:                                   int ostride, int odist,
d@0:                                   int sign, unsigned flags);
d@0: 
d@0:

d@0: This plans multidimensional complex DFTs, and is exactly the same as d@0: fftw_plan_dft except for the new parameters howmany, d@0: {i,o}nembed, {i,o}stride, d@0: and {i,o}dist. d@0: d@0:

howmany is the number of transforms to compute, where the d@0: k-th transform is of the arrays starting at in+k*idist and d@0: out+k*odist. The resulting plans can often be faster than d@0: calling FFTW multiple times for the individual transforms. The basic d@0: fftw_plan_dft interface corresponds to howmany=1 (in which d@0: case the dist parameters are ignored). d@0: d@0: The two nembed parameters (which should be arrays of length d@0: rank) indicate the sizes of the input and output array d@0: dimensions, respectively, where the transform is of a subarray of size d@0: n. (Each dimension of n should be <= the d@0: corresponding dimension of the nembed arrays.) That is, the d@0: input and output arrays are stored in row-major order with size given by d@0: nembed (not counting the strides and howmany multiplicities). d@0: Passing NULL for an nembed parameter is equivalent to d@0: passing n (i.e. same physical and logical dimensions, as in the d@0: basic interface.) d@0: d@0:

The stride parameters indicate that the j-th element of d@0: the input or output arrays is located at j*istride or d@0: j*ostride, respectively. (For a multi-dimensional array, d@0: j is the ordinary row-major index.) When combined with the d@0: k-th transform in a howmany loop, from above, this means d@0: that the (j,k)-th element is at j*stride+k*dist. d@0: (The basic fftw_plan_dft interface corresponds to a stride of 1.) d@0: d@0: For in-place transforms, the input and output stride and d@0: dist parameters should be the same; otherwise, the planner may d@0: return NULL. d@0: d@0:

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

So, for example, to transform a sequence of contiguous arrays, stored d@0: one after another, one would use a stride of 1 and a dist d@0: of N, where N is the product of the dimensions. In d@0: another example, to transform an array of contiguous “vectors” of d@0: length M, one would use a howmany of M, a d@0: stride of M, and a dist of 1. d@0: d@0: d@0: d@0: d@0: