Skip to content

Commit 35afff8

Browse files
topolaritygbaraldi
andcommitted
Improve inferrability
Co-authored-by: Gabriel Baraldi <[email protected]>
1 parent f888022 commit 35afff8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/fft.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ unsafe_convert(::Type{PlanPtr}, p::FFTWPlan) = p.plan
319319
# This is accomplished by the maybe_destroy_plan function, which is used as the plan finalizer.
320320

321321
# these functions should only be called while the fftwlock is held
322-
unsafe_destroy_plan(plan::FFTWPlan{<:fftwDouble}) =
322+
unsafe_destroy_plan(@nospecialize(plan::FFTWPlan{<:fftwDouble})) =
323323
ccall((:fftw_destroy_plan,libfftw3[]), Cvoid, (PlanPtr,), plan)
324-
unsafe_destroy_plan(plan::FFTWPlan{<:fftwSingle}) =
324+
unsafe_destroy_plan(@nospecialize(plan::FFTWPlan{<:fftwSingle})) =
325325
ccall((:fftwf_destroy_plan,libfftw3f[]), Cvoid, (PlanPtr,), plan)
326326

327327
const deferred_destroy_lock = ReentrantLock() # lock protecting the deferred_destroy_plans list
@@ -335,7 +335,7 @@ function destroy_deferred()
335335
# we'll do nothing (the other function will eventually run destroy_deferred).
336336
if !isempty(deferred_destroy_plans) && trylock(fftwlock)
337337
try
338-
foreach(unsafe_destroy_plan, deferred_destroy_plans)
338+
@inline foreach(unsafe_destroy_plan, deferred_destroy_plans)
339339
empty!(deferred_destroy_plans)
340340
finally
341341
unlock(fftwlock)

0 commit comments

Comments
 (0)