Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: Multi-dimensional Transforms Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

Chris@82: Previous: , Up: What FFTW Really Computes   [Contents][Index]

Chris@82:
Chris@82:
Chris@82: Chris@82:

4.8.6 Multi-dimensional Transforms

Chris@82: Chris@82:

The multi-dimensional transforms of FFTW, in general, compute simply the Chris@82: separable product of the given 1d transform along each dimension of the Chris@82: array. Since each of these transforms is unnormalized, computing the Chris@82: forward followed by the backward/inverse multi-dimensional transform Chris@82: will result in the original array scaled by the product of the Chris@82: normalization factors for each dimension (e.g. the product of the Chris@82: dimension sizes, for a multi-dimensional DFT). Chris@82:

Chris@82: Chris@82: Chris@82:

The definition of FFTW’s multi-dimensional DFT of real data (r2c) Chris@82: deserves special attention. In this case, we logically compute the full Chris@82: multi-dimensional DFT of the input data; since the input data are purely Chris@82: real, the output data have the Hermitian symmetry and therefore only one Chris@82: non-redundant half need be stored. More specifically, for an n0 × n1 × n2 × … × nd-1 Chris@82: multi-dimensional real-input DFT, the full (logical) complex output array Chris@82: Y[k0, k1, ..., Chris@82: kd-1] Chris@82: has the symmetry: Chris@82: Y[k0, k1, ..., Chris@82: kd-1] = Y[n0 - Chris@82: k0, n1 - k1, ..., Chris@82: nd-1 - kd-1]* Chris@82: (where each dimension is periodic). Because of this symmetry, we only Chris@82: store the Chris@82: kd-1 = 0...nd-1/2+1 Chris@82: elements of the last dimension (division by 2 is rounded Chris@82: down). (We could instead have cut any other dimension in half, but the Chris@82: last dimension proved computationally convenient.) This results in the Chris@82: peculiar array format described in more detail by Real-data DFT Array Format. Chris@82:

Chris@82:

The multi-dimensional c2r transform is simply the unnormalized inverse Chris@82: of the r2c transform. i.e. it is the same as FFTW’s complex backward Chris@82: multi-dimensional DFT, operating on a Hermitian input array in the Chris@82: peculiar format mentioned above and outputting a real array (since the Chris@82: DFT output is purely real). Chris@82:

Chris@82:

We should remind the user that the separable product of 1d transforms Chris@82: along each dimension, as computed by FFTW, is not always the same thing Chris@82: as the usual multi-dimensional transform. A multi-dimensional Chris@82: R2HC (or HC2R) transform is not identical to the Chris@82: multi-dimensional DFT, requiring some post-processing to combine the Chris@82: requisite real and imaginary parts, as was described in The Halfcomplex-format DFT. Likewise, FFTW’s multidimensional Chris@82: FFTW_DHT r2r transform is not the same thing as the logical Chris@82: multi-dimensional discrete Hartley transform defined in the literature, Chris@82: as discussed in The Discrete Hartley Transform. Chris@82:

Chris@82:
Chris@82:
Chris@82:

Chris@82: Previous: , Up: What FFTW Really Computes   [Contents][Index]

Chris@82:
Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: