Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to precompile linsolve #698

Merged
merged 12 commits into from
Aug 12, 2021
2 changes: 2 additions & 0 deletions src/DiffEqBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ include("init.jl")
include("forwarddiff.jl")
include("chainrules.jl")

include("precompile.jl")
ChrisRackauckas marked this conversation as resolved.
Show resolved Hide resolved

"""
$(TYPEDEF)
"""
Expand Down
2 changes: 1 addition & 1 deletion src/linear_nonlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DefaultLinSolve() = DefaultLinSolve(nothing, nothing, nothing)
end

function isopenblas()
@static if VERSION < v"1.7"
@static if VERSION < v"1.7beta"
blas = BLAS.vendor()
blas == :openblas64 || blas == :openblas
else
Expand Down
12 changes: 12 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
let
while true
_linsolve = DefaultLinSolve()
_testf(du,u,p,t) = du .= u
b = rand(1); x = rand(1)
_linsolve(Val{:init},ODEFunction(_testf),b)
A = rand(1,1)
_linsolve(x,A,b,true)
_linsolve(x,A,b,false)
break
end
end