AbstractFFTs.jl
A general framework for fast Fourier transforms (FFTs) in Julia.
This package is mainly not intended to be used directly.
Instead, developers of packages that implement FFTs (such as FFTW.jl)
extend the types/functions defined in AbstractFFTs
.
This allows multiple FFT packages to coexist with the same underlying fft(x)
and plan_fft(x)
interface.
Developer information
To define a new FFT implementation in your own module, you should

Define a new subtype (e.g.
MyPlan
) ofAbstractFFTs.Plan{T}
for FFTs and related transforms on arrays ofT
. This must have apinv::Plan
field, initially undefined when aMyPlan
is created, that is used for caching the inverse plan. 
Define a new method
AbstractFFTs.plan_fft(x, region; kws...)
that returns aMyPlan
for at least some types ofx
and some set of dimensionsregion
. 
Define a method of
LinearAlgebra.mul!(y, p::MyPlan, x)
(orA_mul_B!(y, p::MyPlan, x)
on Julia prior to 0.7.0DEV.3204) that computes the transformp
ofx
and stores the result iny
. 
Define a method of
*(p::MyPlan, x)
, which can simply call yourmul!
(orA_mul_B!
) method. This is not defined generically in this package due to subtleties that arise for inplace and realinput FFTs. 
If the inverse transform is implemented, you should also define
plan_inv(p::MyPlan)
, which should construct the inverse plan top
, andplan_bfft(x, region; kws...)
for an unnormalized inverse ("backwards") transform ofx
. 
You can also define similar methods of
plan_rfft
andplan_brfft
for realinput FFTs.
The normalization convention for your FFT should be that it computes yₖ = ∑ⱼ xⱼ exp(2πi jk/n) for a transform of length n, and the "backwards" (unnormalized inverse) transform computes the same thing but with exp(+2πi jk/n).