Skip to content

Commit da62b2a

Browse files
Include irrft_dim in RealInverseProjectionStyle
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
1 parent b90a2b3 commit da62b2a

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
@@ -582,15 +582,17 @@ plan_brfft
582582

583583
struct NoProjectionStyle end
584584
struct RealProjectionStyle end
585-
struct RealInverseProjectionStyle end
585+
struct RealInverseProjectionStyle
586+
dim::Int
587+
end
586588
const ProjectionStyle = Union{NoProjectionStyle, RealProjectionStyle, RealInverseProjectionStyle}
587589

588590
function irfft_dim end
589591

590592
output_size(p::Plan) = _output_size(p, ProjectionStyle(p))
591593
_output_size(p::Plan, ::NoProjectionStyle) = size(p)
592594
_output_size(p::Plan, ::RealProjectionStyle) = rfft_output_size(size(p), region(p))
593-
_output_size(p::Plan, ::RealInverseProjectionStyle) = brfft_output_size(size(p), irfft_dim(p), region(p))
595+
_output_size(p::Plan, s::RealInverseProjectionStyle) = brfft_output_size(size(p), s.dim, region(p))
594596

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

test/testplans.jl

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

114114
AbstractFFTs.ProjectionStyle(::TestRPlan) = AbstractFFTs.RealProjectionStyle()
115-
AbstractFFTs.ProjectionStyle(::InverseTestRPlan) = AbstractFFTs.RealInverseProjectionStyle()
116-
AbstractFFTs.irfft_dim(p::InverseTestRPlan) = p.d
115+
AbstractFFTs.ProjectionStyle(p::InverseTestRPlan) = AbstractFFTs.RealInverseProjectionStyle(p.d)
117116

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

0 commit comments

Comments
 (0)