# HG changeset patch # User Tuomo Valkonen # Date 1574174142 18000 # Node ID 29b38780d52bc6ee2d01a859d09a6561ac1544e1 # Parent 5c0f579a5d0f2649c17cc4bdf6fd42eccca7845b Add precompilation hints. Do they help or not? diff -r 5c0f579a5d0f -r 29b38780d52b src/Gradient.jl --- a/src/Gradient.jl Mon Nov 18 18:21:00 2019 -0500 +++ b/src/Gradient.jl Tue Nov 19 09:35:42 2019 -0500 @@ -201,4 +201,23 @@ return u end +##################################################### +# Precompilation hints to speed up compilation time +# for projects depending on this package (hopefully). +###################################################### + +precompile(∇₂!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,2})) +precompile(∇₂!, (Array{Float64,3}, Array{Float64,2})) +precompile(∇₂ᵀ!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,2})) +precompile(∇₂ᵀ!, (Array{Float64,2}, Array{Float64,3})) +precompile(∇₂c!, (Array{Float64,3}, Array{Float64,2})) +precompile(∇₃!, (Array{Float64,3}, Array{Float64,3}, Array{Float64,3},Array{Float64,3})) +precompile(∇₃ᵀ!, (Array{Float64,3}, Array{Float64,3}, Array{Float64,3},Array{Float64,3})) +precompile(vec∇₃!, (Array{Float64,4}, Array{Float64,4}, Array{Float64,4},Array{Float64,4})) +precompile(vec∇₃ᵀ!, (Array{Float64,4}, Array{Float64,4}, Array{Float64,4},Array{Float64,4})) + +# The folding functions cannot be precompiled as theyre' meant to be (hopefully) +# inlined in such a way that the parameter function also gets inlined withou our +# code + end # Module diff -r 5c0f579a5d0f -r 29b38780d52b src/Translate.jl --- a/src/Translate.jl Mon Nov 18 18:21:00 2019 -0500 +++ b/src/Translate.jl Tue Nov 19 09:35:42 2019 -0500 @@ -145,4 +145,13 @@ end end +##################################################### +# Precompilation hints to speed up compilation time +# for projects depending on this package (hopefully). +###################################################### + +precompile(translate_image!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,1})) +precompile(translate_image!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,3})) +precompile(extract_subimage!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,1})) + end