Skip to content

Commit

Permalink
Merge pull request #29 from timholy/teh/precompile
Browse files Browse the repository at this point in the history
Add some precompiles
  • Loading branch information
chriselrod authored Dec 24, 2020
2 parents 739e614 + 67105ae commit 77caf46
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
for T in (Bool, Int, Float32, Float64)
for A in (Vector, Matrix)
precompile(stridedpointer, (A{T},))
end
end
function precompile_nt(@nospecialize(T))
for I (Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64)
precompile(vload_quote, (Type{T}, Type{I}, Symbol, Int, Int, Int, Int, Bool, Bool))
end
# precompile(vfmadd, (Vec{4, T}, Vec{4, T}, Vec{4, T})) # doesn't "take" (too bad, this is expensive)
end
U = NativeTypes
while isa(U, Union)
T, U = U.a, U.b
precompile_nt(T)
end
precompile_nt(U)
precompile(_pick_vector_width, (Type, Vararg{Type,100}))
precompile(>=, (Int, MM{4, 1, Int}))
end

2 comments on commit 77caf46

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/26875

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.14.9 -m "<description of version>" 77caf46f05db34fda1a4b55da3bb08ae38a2df29
git push origin v0.14.9

Please sign in to comment.