Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: New-array Execute Functions 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: FFTW Reference   [Contents][Index]

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

4.6 New-array Execute Functions

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

Normally, one executes a plan for the arrays with which the plan was Chris@82: created, by calling fftw_execute(plan) as described in Using Plans. Chris@82: Chris@82: However, it is possible for sophisticated users to apply a given plan Chris@82: to a different array using the “new-array execute” functions Chris@82: detailed below, provided that the following conditions are met: Chris@82:

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

The alignment issue is especially critical, because if you don’t use Chris@82: fftw_malloc then you may have little control over the alignment Chris@82: of arrays in memory. For example, neither the C++ new function Chris@82: nor the Fortran allocate statement provide strong enough Chris@82: guarantees about data alignment. If you don’t use fftw_malloc, Chris@82: therefore, you probably have to use FFTW_UNALIGNED (which Chris@82: disables most SIMD support). If possible, it is probably better for Chris@82: you to simply create multiple plans (creating a new plan is quick once Chris@82: one exists for a given size), or better yet re-use the same array for Chris@82: your transforms. Chris@82:

Chris@82: Chris@82:

For rare circumstances in which you cannot control the alignment of Chris@82: allocated memory, but wish to determine where a given array is Chris@82: aligned like the original array for which a plan was created, you can Chris@82: use the fftw_alignment_of function: Chris@82:

Chris@82:
int fftw_alignment_of(double *p);
Chris@82: 
Chris@82:

Two arrays have equivalent alignment (for the purposes of applying a Chris@82: plan) if and only if fftw_alignment_of returns the same value Chris@82: for the corresponding pointers to their data (typecast to double* Chris@82: if necessary). Chris@82:

Chris@82:

If you are tempted to use the new-array execute interface because you Chris@82: want to transform a known bunch of arrays of the same size, you should Chris@82: probably go use the advanced interface instead (see Advanced Interface)). Chris@82:

Chris@82:

The new-array execute functions are: Chris@82:

Chris@82:
Chris@82:
void fftw_execute_dft(
Chris@82:      const fftw_plan p, 
Chris@82:      fftw_complex *in, fftw_complex *out);
Chris@82: 
Chris@82: void fftw_execute_split_dft(
Chris@82:      const fftw_plan p, 
Chris@82:      double *ri, double *ii, double *ro, double *io);
Chris@82: 
Chris@82: void fftw_execute_dft_r2c(
Chris@82:      const fftw_plan p,
Chris@82:      double *in, fftw_complex *out);
Chris@82: 
Chris@82: void fftw_execute_split_dft_r2c(
Chris@82:      const fftw_plan p,
Chris@82:      double *in, double *ro, double *io);
Chris@82: 
Chris@82: void fftw_execute_dft_c2r(
Chris@82:      const fftw_plan p,
Chris@82:      fftw_complex *in, double *out);
Chris@82: 
Chris@82: void fftw_execute_split_dft_c2r(
Chris@82:      const fftw_plan p,
Chris@82:      double *ri, double *ii, double *out);
Chris@82: 
Chris@82: void fftw_execute_r2r(
Chris@82:      const fftw_plan p, 
Chris@82:      double *in, double *out);
Chris@82: 
Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:

These execute the plan to compute the corresponding transform on Chris@82: the input/output arrays specified by the subsequent arguments. The Chris@82: input/output array arguments have the same meanings as the ones passed Chris@82: to the guru planner routines in the preceding sections. The plan Chris@82: is not modified, and these routines can be called as many times as Chris@82: desired, or intermixed with calls to the ordinary fftw_execute. Chris@82:

Chris@82:

The plan must have been created for the transform type Chris@82: corresponding to the execute function, e.g. it must be a complex-DFT Chris@82: plan for fftw_execute_dft. Any of the planner routines for that Chris@82: transform type, from the basic to the guru interface, could have been Chris@82: used to create the plan, however. Chris@82:

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

Chris@82: Next: , Previous: , Up: FFTW Reference   [Contents][Index]

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