Skip to content

Commit

Permalink
Remove unnecessary caching in plan_inv of test plans
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-arya committed Jul 1, 2022
1 parent 3e7d412 commit b848c54
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/testplans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ function AbstractFFTs.plan_bfft(x::AbstractArray{T}, region; kwargs...) where {T
end
function AbstractFFTs.plan_inv(p::TestPlan{T}) where {T}
unscaled_pinv = InverseTestPlan{T}(p.region, p.sz)
unscaled_pinv.pinv = p
pinv = AbstractFFTs.ScaledPlan(
unscaled_pinv, AbstractFFTs.normalization(T, p.sz, p.region),
)
return pinv
end
function AbstractFFTs.plan_inv(p::InverseTestPlan{T}) where {T}
unscaled_pinv = TestPlan{T}(p.region, p.sz)
unscaled_pinv.pinv = p
pinv = AbstractFFTs.ScaledPlan(
unscaled_pinv, AbstractFFTs.normalization(T, p.sz, p.region),
)
Expand Down Expand Up @@ -119,7 +117,6 @@ function AbstractFFTs.plan_inv(p::TestRPlan{T,N}) where {T,N}
d = p.sz[firstdim]
sz = ntuple(i -> i == firstdim ? d ÷ 2 + 1 : p.sz[i], Val(N))
unscaled_pinv = InverseTestRPlan{T}(d, p.region, sz)
unscaled_pinv.pinv = p
pinv = AbstractFFTs.ScaledPlan(
unscaled_pinv, AbstractFFTs.normalization(T, p.sz, p.region),
)
Expand All @@ -129,7 +126,6 @@ function AbstractFFTs.plan_inv(p::InverseTestRPlan{T,N}) where {T,N}
firstdim = first(p.region)::Int
sz = ntuple(i -> i == firstdim ? p.d : p.sz[i], Val(N))
unscaled_pinv = TestRPlan{T}(p.region, sz)
unscaled_pinv.pinv = p
pinv = AbstractFFTs.ScaledPlan(
unscaled_pinv, AbstractFFTs.normalization(T, sz, p.region),
)
Expand Down

0 comments on commit b848c54

Please sign in to comment.