Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: Guru vector and transform sizes 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: Next: , Previous: , Up: Guru Interface   [Contents][Index]

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

4.5.2 Guru vector and transform sizes

Chris@82: Chris@82:

The guru interface introduces one basic new data structure, Chris@82: fftw_iodim, that is used to specify sizes and strides for Chris@82: multi-dimensional transforms and vectors: Chris@82:

Chris@82:
Chris@82:
typedef struct {
Chris@82:      int n;
Chris@82:      int is;
Chris@82:      int os;
Chris@82: } fftw_iodim;
Chris@82: 
Chris@82: Chris@82: Chris@82:

Here, n is the size of the dimension, and is and os Chris@82: are the strides of that dimension for the input and output arrays. (The Chris@82: stride is the separation of consecutive elements along this dimension.) Chris@82:

Chris@82:

The meaning of the stride parameter depends on the type of the array Chris@82: that the stride refers to. If the array is interleaved complex, Chris@82: strides are expressed in units of complex numbers Chris@82: (fftw_complex). If the array is split complex or real, strides Chris@82: are expressed in units of real numbers (double). This Chris@82: convention is consistent with the usual pointer arithmetic in the C Chris@82: language. An interleaved array is denoted by a pointer p to Chris@82: fftw_complex, so that p+1 points to the next complex Chris@82: number. Split arrays are denoted by pointers to double, in Chris@82: which case pointer arithmetic operates in units of Chris@82: sizeof(double). Chris@82: Chris@82:

Chris@82: Chris@82:

The guru planner interfaces all take a (rank, dims[rank]) Chris@82: pair describing the transform size, and a (howmany_rank, Chris@82: howmany_dims[howmany_rank]) pair describing the “vector” size (a Chris@82: multi-dimensional loop of transforms to perform), where dims and Chris@82: howmany_dims are arrays of fftw_iodim. Each n field must Chris@82: be positive for dims and nonnegative for howmany_dims, while both Chris@82: rank and howmany_rank must be nonnegative. Chris@82:

Chris@82:

For example, the howmany parameter in the advanced complex-DFT Chris@82: interface corresponds to howmany_rank = 1, Chris@82: howmany_dims[0].n = howmany, howmany_dims[0].is = Chris@82: idist, and howmany_dims[0].os = odist. Chris@82: Chris@82: Chris@82: (To compute a single transform, you can just use howmany_rank = 0.) Chris@82:

Chris@82: Chris@82:

A row-major multidimensional array with dimensions n[rank] Chris@82: (see Row-major Format) corresponds to dims[i].n = Chris@82: n[i] and the recurrence dims[i].is = n[i+1] * Chris@82: dims[i+1].is (similarly for os). The stride of the last Chris@82: (i=rank-1) dimension is the overall stride of the array. Chris@82: e.g. to be equivalent to the advanced complex-DFT interface, you would Chris@82: have dims[rank-1].is = istride and Chris@82: dims[rank-1].os = ostride. Chris@82: Chris@82:

Chris@82: Chris@82:

In general, we only guarantee FFTW to return a non-NULL plan if Chris@82: the vector and transform dimensions correspond to a set of distinct Chris@82: indices, and for in-place transforms the input/output strides should Chris@82: be the same. Chris@82:

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

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

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