fftwlib
FFTW planner flags
Tells FFTW to find an optimized plan by actually computing several FFTs and measuring their execution time.
Depending on your machine, this can take some time (often a few seconds). Default (0x0).
Specifies that an out-of-place transform is allowed to overwrite its
input array with arbitrary data; this can sometimes allow more efficient algorithms to be employed.
Rarely used. Specifies that the algorithm may not impose any unusual alignment requirements on the input/output
arrays (i.e. no SIMD). This flag is normally not necessary, since the planner automatically detects
misaligned arrays. The only use for this flag is if you want to use the guru interface to execute a given
plan on a different array that may not be aligned like the original.
Not used.
Like Patient, but considers an even wider range of algorithms, including many that we think are
unlikely to be fast, to produce the most optimal plan but with a substantially increased planning time.
Specifies that an out-of-place transform must not change its input array.
This is ordinarily the default,
except for c2r and hc2r (i.e. complex-to-real) transforms for which DestroyInput is the default.
In the latter cases, passing PreserveInput will attempt to use algorithms that do not destroy the
input, at the expense of worse performance; for multi-dimensional c2r transforms, however, no
input-preserving algorithms are implemented and the planner will return null if one is requested.
Like Measure, but considers a wider range of algorithms and often produces a “more optimal” plan
(especially for large transforms), but at the expense of several times longer planning time
(especially for large transforms).
Specifies that, instead of actual measurements of different algorithms, a simple heuristic is
used to pick a (probably sub-optimal) plan quickly. With this flag, the input/output arrays
are not overwritten during planning.
Defines direction of operation
Computes a regular DFT
Computes the inverse DFT
Kinds of real-to-real transforms
Contains the Basic Interface FFTW functions for single-precision (float) operations
Allocates FFTW-optimized unmanaged memory
Amount to allocate, in bytes
Pointer to allocated memory
Deallocates memory allocated by FFTW malloc
Pointer to memory to release
Deallocates an FFTW plan and all associated resources
Pointer to the plan to release
Clears all memory used by FFTW, resets it to initial state. Does not replace destroy_plan and free
After calling fftw_cleanup, all existing plans become undefined, and you should not
attempt to execute them nor to destroy them. You can however create and execute/destroy new plans,
in which case FFTW starts accumulating wisdom information again.
fftw_cleanup does not deallocate your plans; you should still call fftw_destroy_plan for this purpose.
Sets the maximum time that can be used by the planner.
Maximum time, in seconds.
This function instructs FFTW to spend at most seconds seconds (approximately) in the planner.
If seconds == -1.0 (the default value), then planning time is unbounded.
Otherwise, FFTW plans with a progressively wider range of algorithms until the the given time limit is
reached or the given range of algorithms is explored, returning the best available plan. For example,
specifying fftw_flags.Patient first plans in Estimate mode, then in Measure mode, then finally (time
permitting) in Patient. If fftw_flags.Exhaustive is specified instead, the planner will further progress to
Exhaustive mode.
Executes an FFTW plan, provided that the input and output arrays still exist
Pointer to the plan to execute
execute (and equivalents) is the only function in FFTW guaranteed to be thread-safe.
Creates a plan for a 1-dimensional complex-to-complex DFT
The logical size of the transform
Specifies the direction of the transform
Pointer to an array of 8-byte complex numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional complex-to-complex DFT
The logical size of the transform along the first dimension
The logical size of the transform along the second dimension
Specifies the direction of the transform
Pointer to an array of 8-byte complex numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional complex-to-complex DFT
The logical size of the transform along the first dimension
The logical size of the transform along the second dimension
The logical size of the transform along the third dimension
Specifies the direction of the transform
Pointer to an array of 8-byte complex numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional complex-to-complex DFT
Number of dimensions
Array containing the logical size along each dimension
Specifies the direction of the transform
Pointer to an array of 8-byte complex numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 1-dimensional real-to-complex DFT
Number of REAL (input) elements in the transform
Pointer to an array of 4-byte real numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional real-to-complex DFT
Number of REAL (input) elements in the transform along the first dimension
Number of REAL (input) elements in the transform along the second dimension
Pointer to an array of 4-byte real numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional real-to-complex DFT
Number of REAL (input) elements in the transform along the first dimension
Number of REAL (input) elements in the transform along the second dimension
Number of REAL (input) elements in the transform along the third dimension
Pointer to an array of 4-byte real numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional real-to-complex DFT
Number of dimensions
Array containing the number of REAL (input) elements along each dimension
Pointer to an array of 4-byte real numbers
Pointer to an array of 8-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 1-dimensional complex-to-real DFT
Number of REAL (output) elements in the transform
Pointer to an array of 8-byte complex numbers
Pointer to an array of 4-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional complex-to-real DFT
Number of REAL (output) elements in the transform along the first dimension
Number of REAL (output) elements in the transform along the second dimension
Pointer to an array of 8-byte complex numbers
Pointer to an array of 4-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional complex-to-real DFT
Number of REAL (output) elements in the transform along the first dimension
Number of REAL (output) elements in the transform along the second dimension
Number of REAL (output) elements in the transform along the third dimension
Pointer to an array of 8-byte complex numbers
Pointer to an array of 4-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional complex-to-real DFT
Number of dimensions
Array containing the number of REAL (output) elements along each dimension
Pointer to an array of 8-byte complex numbers
Pointer to an array of 4-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for a 1-dimensional real-to-real DFT
Number of elements in the transform
Pointer to an array of 4-byte real numbers
Pointer to an array of 4-byte real numbers
The kind of real-to-real transform to compute
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional real-to-real DFT
Number of elements in the transform along the first dimension
Number of elements in the transform along the second dimension
Pointer to an array of 4-byte real numbers
Pointer to an array of 4-byte real numbers
The kind of real-to-real transform to compute along the first dimension
The kind of real-to-real transform to compute along the second dimension
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional real-to-real DFT
Number of elements in the transform along the first dimension
Number of elements in the transform along the second dimension
Number of elements in the transform along the third dimension
Pointer to an array of 4-byte real numbers
Pointer to an array of 4-byte real numbers
The kind of real-to-real transform to compute along the first dimension
The kind of real-to-real transform to compute along the second dimension
The kind of real-to-real transform to compute along the third dimension
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional real-to-real DFT
Number of dimensions
Array containing the number of elements in the transform along each dimension
Pointer to an array of 4-byte real numbers
Pointer to an array of 4-byte real numbers
An array containing the kind of real-to-real transform to compute along each dimension
Flags that specify the behavior of the planner
Returns (approximately) the number of flops used by a certain plan
The plan to measure
Reference to double to hold number of adds
Reference to double to hold number of muls
Reference to double to hold number of fmas (fused multiply-add)
Total flops ~= add+mul+2*fma or add+mul+fma if fma is supported
Outputs a "nerd-readable" version of the specified plan to stdout
The plan to output
Contains the Basic Interface FFTW functions for double-precision (double) operations
Allocates FFTW-optimized unmanaged memory
Amount to allocate, in bytes
Pointer to allocated memory
Deallocates memory allocated by FFTW malloc
Pointer to memory to release
Deallocates an FFTW plan and all associated resources
Pointer to the plan to release
Clears all memory used by FFTW, resets it to initial state. Does not replace destroy_plan and free
After calling fftw_cleanup, all existing plans become undefined, and you should not
attempt to execute them nor to destroy them. You can however create and execute/destroy new plans,
in which case FFTW starts accumulating wisdom information again.
fftw_cleanup does not deallocate your plans; you should still call fftw_destroy_plan for this purpose.
Sets the maximum time that can be used by the planner.
Maximum time, in seconds.
This function instructs FFTW to spend at most seconds seconds (approximately) in the planner.
If seconds == -1.0 (the default value), then planning time is unbounded.
Otherwise, FFTW plans with a progressively wider range of algorithms until the the given time limit is
reached or the given range of algorithms is explored, returning the best available plan. For example,
specifying fftw_flags.Patient first plans in Estimate mode, then in Measure mode, then finally (time
permitting) in Patient. If fftw_flags.Exhaustive is specified instead, the planner will further progress to
Exhaustive mode.
Executes an FFTW plan, provided that the input and output arrays still exist
Pointer to the plan to execute
execute (and equivalents) is the only function in FFTW guaranteed to be thread-safe.
Creates a plan for a 1-dimensional complex-to-complex DFT
The logical size of the transform
Specifies the direction of the transform
Pointer to an array of 16-byte complex numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional complex-to-complex DFT
The logical size of the transform along the first dimension
The logical size of the transform along the second dimension
Specifies the direction of the transform
Pointer to an array of 16-byte complex numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional complex-to-complex DFT
The logical size of the transform along the first dimension
The logical size of the transform along the second dimension
The logical size of the transform along the third dimension
Specifies the direction of the transform
Pointer to an array of 16-byte complex numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional complex-to-complex DFT
Number of dimensions
Array containing the logical size along each dimension
Specifies the direction of the transform
Pointer to an array of 16-byte complex numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 1-dimensional real-to-complex DFT
Number of REAL (input) elements in the transform
Pointer to an array of 8-byte real numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional real-to-complex DFT
Number of REAL (input) elements in the transform along the first dimension
Number of REAL (input) elements in the transform along the second dimension
Pointer to an array of 8-byte real numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional real-to-complex DFT
Number of REAL (input) elements in the transform along the first dimension
Number of REAL (input) elements in the transform along the second dimension
Number of REAL (input) elements in the transform along the third dimension
Pointer to an array of 8-byte real numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional real-to-complex DFT
Number of dimensions
Array containing the number of REAL (input) elements along each dimension
Pointer to an array of 8-byte real numbers
Pointer to an array of 16-byte complex numbers
Flags that specify the behavior of the planner
Creates a plan for a 1-dimensional complex-to-real DFT
Number of REAL (output) elements in the transform
Pointer to an array of 16-byte complex numbers
Pointer to an array of 8-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional complex-to-real DFT
Number of REAL (output) elements in the transform along the first dimension
Number of REAL (output) elements in the transform along the second dimension
Pointer to an array of 16-byte complex numbers
Pointer to an array of 8-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional complex-to-real DFT
Number of REAL (output) elements in the transform along the first dimension
Number of REAL (output) elements in the transform along the second dimension
Number of REAL (output) elements in the transform along the third dimension
Pointer to an array of 16-byte complex numbers
Pointer to an array of 8-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional complex-to-real DFT
Number of dimensions
Array containing the number of REAL (output) elements along each dimension
Pointer to an array of 16-byte complex numbers
Pointer to an array of 8-byte real numbers
Flags that specify the behavior of the planner
Creates a plan for a 1-dimensional real-to-real DFT
Number of elements in the transform
Pointer to an array of 8-byte real numbers
Pointer to an array of 8-byte real numbers
The kind of real-to-real transform to compute
Flags that specify the behavior of the planner
Creates a plan for a 2-dimensional real-to-real DFT
Number of elements in the transform along the first dimension
Number of elements in the transform along the second dimension
Pointer to an array of 8-byte real numbers
Pointer to an array of 8-byte real numbers
The kind of real-to-real transform to compute along the first dimension
The kind of real-to-real transform to compute along the second dimension
Flags that specify the behavior of the planner
Creates a plan for a 3-dimensional real-to-real DFT
Number of elements in the transform along the first dimension
Number of elements in the transform along the second dimension
Number of elements in the transform along the third dimension
Pointer to an array of 8-byte real numbers
Pointer to an array of 8-byte real numbers
The kind of real-to-real transform to compute along the first dimension
The kind of real-to-real transform to compute along the second dimension
The kind of real-to-real transform to compute along the third dimension
Flags that specify the behavior of the planner
Creates a plan for an n-dimensional real-to-real DFT
Number of dimensions
Array containing the number of elements in the transform along each dimension
Pointer to an array of 8-byte real numbers
Pointer to an array of 8-byte real numbers
An array containing the kind of real-to-real transform to compute along each dimension
Flags that specify the behavior of the planner
Returns (approximately) the number of flops used by a certain plan
The plan to measure
Reference to double to hold number of adds
Reference to double to hold number of muls
Reference to double to hold number of fmas (fused multiply-add)
Total flops ~= add+mul+2*fma or add+mul+fma if fma is supported
Outputs a "nerd-readable" version of the specified plan to stdout
The plan to output