Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: FFTW 3.3.5: Guru vector and transform sizes 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.2 Guru vector and transform sizes

Chris@42: Chris@42:

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

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

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

Chris@42:

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

Chris@42: Chris@42:

The guru planner interfaces all take a (rank, dims[rank]) Chris@42: pair describing the transform size, and a (howmany_rank, Chris@42: howmany_dims[howmany_rank]) pair describing the “vector” size (a Chris@42: multi-dimensional loop of transforms to perform), where dims and Chris@42: howmany_dims are arrays of fftw_iodim. Chris@42:

Chris@42:

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

Chris@42: Chris@42:

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

Chris@42: Chris@42:

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