Skip to content

Commit 93a8102

Browse files
committed
Tweaks
1 parent bfd3133 commit 93a8102

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/src/implementations.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ To define a new FFT implementation in your own module, you should
3232

3333
* You can also define similar methods of `plan_rfft` and `plan_brfft` for real-input FFTs.
3434

35-
* We offer an experimental `AdjointStyle` trait to enable automatic computation of adjoint plans via [`Base.adjoint`](@ref),
36-
(which `AbstractFFTs` uses to implement reverse-mode differentiation rules). To support adjoints in a new plan, define the trait `AbstractFFTs.AdjointStyle(::MyPlan)`. This should return a subtype of `AS <: AbstractFFTs.AdjointStyle` supporting `AbstractFFTs.adjoint_mul(::AdjointPlan, ::AbstractArray, ::AS)`. `AbstractFFTs` pre-implements [`AbstractFFTs.FFTAdjointStyle`](@ref), [`AbstractFFTs.RFFTAdjointStyle`](@ref),
37-
[`AbstractFFTs.BRFFTAdjointStyle`](@ref), and [`AbstractFFTs.UnitaryAdjointStyle`](@ref).
35+
* To enable automatic computation of adjoint plans via [`Base.adjoint`](@ref), `AbstractFFTs` offers an experimental `AdjointStyle` trait.
36+
To support adjoints in a new plan, define the trait `AbstractFFTs.AdjointStyle(::MyPlan)`, returning an instance of type
37+
`AS <: AbstractFFTs.AdjointStyle` supporting `AbstractFFTs.adjoint_mul(::AdjointPlan, ::AbstractArray, ::AS)`.
38+
39+
`AbstractFFTs` pre-implements the following adjoint styles: [`AbstractFFTs.FFTAdjointStyle`](@ref),
40+
[`AbstractFFTs.RFFTAdjointStyle`](@ref), [`AbstractFFTs.BRFFTAdjointStyle`](@ref), [`AbstractFFTs.UnitaryAdjointStyle`](@ref).
3841

3942
The normalization convention for your FFT should be that it computes ``y_k = \sum_j x_j \exp(-2\pi i j k/n)`` for a transform of
4043
length ``n``, and the "backwards" (unnormalized inverse) transform computes the same thing but with ``\exp(+2\pi i jk/n)``.

src/definitions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ to exploit its conjugate symmetry (see [`rfft`](@ref)).
608608
struct RFFTAdjointStyle <: AdjointStyle end
609609

610610
"""
611-
BRFFTAdjointStyle(d::Dim)
611+
BRFFTAdjointStyle(d::Int)
612612
613613
Projection style for complex to real discrete Fourier transforms, for plans that
614614
expect an input with a halved dimension analogously to [`irfft`](@ref), where `d`

0 commit comments

Comments
 (0)