Skip to content

Commit 5d5c06c

Browse files
Include irrft_dim in RealInverseProjectionStyle
Co-authored-by: David Widmann <[email protected]>
1 parent 497ff4d commit 5d5c06c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/definitions.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,15 +583,17 @@ plan_brfft
583583

584584
struct NoProjectionStyle end
585585
struct RealProjectionStyle end
586-
struct RealInverseProjectionStyle end
586+
struct RealInverseProjectionStyle
587+
dim::Int
588+
end
587589
const ProjectionStyle = Union{NoProjectionStyle, RealProjectionStyle, RealInverseProjectionStyle}
588590

589591
function irfft_dim end
590592

591593
output_size(p::Plan) = _output_size(p, ProjectionStyle(p))
592594
_output_size(p::Plan, ::NoProjectionStyle) = size(p)
593595
_output_size(p::Plan, ::RealProjectionStyle) = rfft_output_size(size(p), region(p))
594-
_output_size(p::Plan, ::RealInverseProjectionStyle) = brfft_output_size(size(p), irfft_dim(p), region(p))
596+
_output_size(p::Plan, s::RealInverseProjectionStyle) = brfft_output_size(size(p), s.dim, region(p))
595597

596598
mutable struct AdjointPlan{T,P<:Plan} <: Plan{T}
597599
p::P

test/testplans.jl

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

113113
AbstractFFTs.ProjectionStyle(::TestRPlan) = AbstractFFTs.RealProjectionStyle()
114-
AbstractFFTs.ProjectionStyle(::InverseTestRPlan) = AbstractFFTs.RealInverseProjectionStyle()
115-
AbstractFFTs.irfft_dim(p::InverseTestRPlan) = p.d
114+
AbstractFFTs.ProjectionStyle(p::InverseTestRPlan) = AbstractFFTs.RealInverseProjectionStyle(p.d)
116115

117116
function AbstractFFTs.plan_rfft(x::AbstractArray{T}, region; kwargs...) where {T}
118117
return TestRPlan{T}(region, size(x))

0 commit comments

Comments
 (0)