Skip to content

Commit 33ee0ac

Browse files
committed
Rename BRFFTAdjointStyle -> IRFFTAdjointStyle
1 parent bfd3133 commit 33ee0ac

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/src/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ AbstractFFTs.fftdims
2323
Base.adjoint
2424
AbstractFFTs.FFTAdjointStyle
2525
AbstractFFTs.RFFTAdjointStyle
26-
AbstractFFTs.BRFFTAdjointStyle
26+
AbstractFFTs.IRFFTAdjointStyle
2727
AbstractFFTs.UnitaryAdjointStyle
2828
AbstractFFTs.fftshift
2929
AbstractFFTs.fftshift!

docs/src/implementations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To define a new FFT implementation in your own module, you should
3434

3535
* We offer an experimental `AdjointStyle` trait to enable automatic computation of adjoint plans via [`Base.adjoint`](@ref),
3636
(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).
37+
[`AbstractFFTs.IRFFTAdjointStyle`](@ref), and [`AbstractFFTs.UnitaryAdjointStyle`](@ref).
3838

3939
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
4040
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: 4 additions & 4 deletions
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+
IRFFTAdjointStyle(d::Dim)
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`
@@ -618,7 +618,7 @@ Since the Fourier transform is unitary up to a scaling, the adjoint applies the
618618
inverse, but with additional logic to handle the fact that the input is projected
619619
to exploit its conjugate symmetry (see [`irfft`](@ref)).
620620
"""
621-
struct BRFFTAdjointStyle <: AdjointStyle
621+
struct IRFFTAdjointStyle <: AdjointStyle
622622
dim::Int
623623
end
624624

@@ -632,7 +632,7 @@ struct UnitaryAdjointStyle <: AdjointStyle end
632632
output_size(p::Plan) = _output_size(p, AdjointStyle(p))
633633
_output_size(p::Plan, ::FFTAdjointStyle) = size(p)
634634
_output_size(p::Plan, ::RFFTAdjointStyle) = rfft_output_size(size(p), fftdims(p))
635-
_output_size(p::Plan, s::BRFFTAdjointStyle) = brfft_output_size(size(p), s.dim, fftdims(p))
635+
_output_size(p::Plan, s::IRFFTAdjointStyle) = brfft_output_size(size(p), s.dim, fftdims(p))
636636
_output_size(p::Plan, ::UnitaryAdjointStyle) = size(p)
637637

638638
struct AdjointPlan{T,P<:Plan} <: Plan{T}
@@ -681,7 +681,7 @@ function adjoint_mul(p::AdjointPlan{T}, x::AbstractArray, ::RFFTAdjointStyle) wh
681681
return p.p \ (x ./ convert(typeof(x), scale))
682682
end
683683

684-
function adjoint_mul(p::AdjointPlan{T}, x::AbstractArray, ::BRFFTAdjointStyle) where {T}
684+
function adjoint_mul(p::AdjointPlan{T}, x::AbstractArray, ::IRFFTAdjointStyle) where {T}
685685
dims = fftdims(p.p)
686686
N = normalization(real(T), output_size(p.p), dims)
687687
halfdim = first(dims)

test/testplans.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mutable struct InverseTestRPlan{T,N,G} <: Plan{Complex{T}}
111111
end
112112

113113
AbstractFFTs.AdjointStyle(::TestRPlan) = AbstractFFTs.RFFTAdjointStyle()
114-
AbstractFFTs.AdjointStyle(p::InverseTestRPlan) = AbstractFFTs.BRFFTAdjointStyle(p.d)
114+
AbstractFFTs.AdjointStyle(p::InverseTestRPlan) = AbstractFFTs.IRFFTAdjointStyle(p.d)
115115

116116
function AbstractFFTs.plan_rfft(x::AbstractArray{T}, region; kwargs...) where {T<:Real}
117117
return TestRPlan{T}(region, size(x))

0 commit comments

Comments
 (0)