Skip to content

Commit

Permalink
Migrate from SnoopPrecompile to PrecompileTools (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
junyuan-chen authored May 16, 2023
1 parent 66abd1f commit 20194fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NLSolversBase = "d41bc354-129a-5804-8e4c-c37616107c6c"
PositiveFactorizations = "85a6dd25-e78a-55b7-8502-1745935b8125"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"

[compat]
CommonSolve = "0.2"
FastLapackInterface = "1.2"
NLSolversBase = "7.6"
PositiveFactorizations = "0.2.4"
SnoopPrecompile = "1"
PrecompileTools = "1"
julia = "1.6"

[extras]
Expand Down
6 changes: 3 additions & 3 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using SnoopPrecompile: @precompile_setup, @precompile_all_calls
using PrecompileTools: @setup_workload, @compile_workload

@precompile_setup begin
@setup_workload begin
# Create sample problems
function p1_f!(out, x)
n = length(x)
Expand All @@ -18,7 +18,7 @@ using SnoopPrecompile: @precompile_setup, @precompile_all_calls
out
end
x0_15 = [1.0, 0.0, 0.0, 1.0]
@precompile_all_calls begin
@compile_workload begin
solve(Hybrid, p1_f!, x0_1)
solve(Hybrid, p15_f!, x0_15, thres_jac=0)
solve(Hybrid{LeastSquares}, fdf, x0_1;
Expand Down

0 comments on commit 20194fe

Please sign in to comment.