Skip to content

Commit bc16ae1

Browse files
authored
more docs in README
1 parent 91ac7a2 commit bc16ae1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
# AbstractFFTs.jl
22

33
A general framework for fast Fourier transforms (FFTs) in Julia.
4+
5+
This package is mainly not intended to be used directly. Instead, developers of packages that implement FFTs (such as [FFTW.jl](https://github.com/JuliaMath/FFTW.jl)) extend the types/functions defined in `AbstractFFTs`. This multiple FFT packages to co-exist with the same underlying `fft(x)` and `plan_fft(x)` interface.
6+
7+
## Developer information
8+
9+
To define a new FFT implementation in your own module, you should
10+
11+
* Define a new subtype (e.g. `MyPlan`) of `AbstractFFTs.Plan{T}` for FFTs and related transforms on arrays of `T`. This must have a `pinv::Plan` field, initially undefined when a `MyPlan` is created, that is used for caching the inverse plan.
12+
13+
* Define a new method `AbstractFFTs.plan_fft(x, region; kws...)` that returns a `MyPlan` for at least some types of `x` and some set of dimensions `region`.
14+
15+
* Define a method of `A_mul_B!(y, p::MyPlan, x)` that computes the transform `p` of `x` and stores the result in `y`.
16+
17+
* If the inverse transform is implemented, you should also define `plan_inv(p::MyPlan)`, which should construct the inverse plan to `p`, and `plan_bfft(x, region; kws...)` for an unnormalized inverse ("backwards") transform of `x`.
18+
19+
* You can also define similar methods of `plan_rfft` and `plan_brfft` for real-input FFTs.
20+
21+
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).

0 commit comments

Comments
 (0)