diff --git a/src/definitions.jl b/src/definitions.jl index e02de62..6c808d9 100644 --- a/src/definitions.jl +++ b/src/definitions.jl @@ -582,7 +582,9 @@ plan_brfft struct NoProjectionStyle end struct RealProjectionStyle end -struct RealInverseProjectionStyle end +struct RealInverseProjectionStyle + dim::Int +end const ProjectionStyle = Union{NoProjectionStyle, RealProjectionStyle, RealInverseProjectionStyle} function irfft_dim end @@ -590,7 +592,7 @@ function irfft_dim end output_size(p::Plan) = _output_size(p, ProjectionStyle(p)) _output_size(p::Plan, ::NoProjectionStyle) = size(p) _output_size(p::Plan, ::RealProjectionStyle) = rfft_output_size(size(p), region(p)) -_output_size(p::Plan, ::RealInverseProjectionStyle) = brfft_output_size(size(p), irfft_dim(p), region(p)) +_output_size(p::Plan, s::RealInverseProjectionStyle) = brfft_output_size(size(p), s.dim, region(p)) mutable struct AdjointPlan{T,P<:Plan} <: Plan{T} p::P diff --git a/test/testplans.jl b/test/testplans.jl index b39c7ea..efb7d69 100644 --- a/test/testplans.jl +++ b/test/testplans.jl @@ -112,8 +112,7 @@ mutable struct InverseTestRPlan{T,N,G} <: Plan{T} end AbstractFFTs.ProjectionStyle(::TestRPlan) = AbstractFFTs.RealProjectionStyle() -AbstractFFTs.ProjectionStyle(::InverseTestRPlan) = AbstractFFTs.RealInverseProjectionStyle() -AbstractFFTs.irfft_dim(p::InverseTestRPlan) = p.d +AbstractFFTs.ProjectionStyle(p::InverseTestRPlan) = AbstractFFTs.RealInverseProjectionStyle(p.d) function AbstractFFTs.plan_rfft(x::AbstractArray{T}, region; kwargs...) where {T} return TestRPlan{T}(region, size(x))