Skip to content

Commit

Permalink
Migrate from SnoopPrecompile to PrecompileTools (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy authored Apr 25, 2023
1 parent f632411 commit 75d2a44
Show file tree
Hide file tree
Showing 3 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,7 +10,7 @@ DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[weakdeps]
Expand All @@ -31,7 +31,7 @@ Makie = "0.19"
PlotlyJS = "0.18"
Reexport = "1"
Requires = "1.1"
SnoopPrecompile = "1"
PrecompileTools = "1"
Spglib = "0.6"
StaticArrays = "1.2"
julia = "1.6"
Expand Down
2 changes: 1 addition & 1 deletion src/Brillouin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ include("WignerSeitz.jl")
# ---------------------------------------------------------------------------------------- #
# SNOOPPRECOMPILE

using SnoopPrecompile
using PrecompileTools
include("precompile.jl")

# ---------------------------------------------------------------------------------------- #
Expand Down
4 changes: 2 additions & 2 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@precompile_setup begin
@setup_workload begin
using Bravais: directbasis

Rs2D_v = [(@SVector [1.0,0]), (@SVector [0,1.0])]
Rs2D = directbasis(11, Val(2))
Rs3D_v = [(@SVector [1.0,0,0]), (@SVector [0,1.0,0]), (@SVector [0,0,1.0])]
Rs3D = directbasis(227, Val(3))

@precompile_all_calls begin
@compile_workload begin
function _precompile(sgnum, Rs, Dᵛ::Val{D}) where D
kp = irrfbz_path(sgnum, Rs, Dᵛ)
cartesianize(kp)
Expand Down

0 comments on commit 75d2a44

Please sign in to comment.