Skip to content

Commit

Permalink
add some very basic precompile workload (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Dec 30, 2022
1 parent b69905c commit d825a07
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ uuid = "fdea26ae-647d-5447-a871-4b548cad5224"
authors = ["Erik Schnetter <[email protected]>", "Kristoffer Carlsson <[email protected]>"]
version = "3.4.2"

[deps]
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"

[compat]
SnoopPrecompile = "1"
julia = "1.6"

[extras]
Expand Down
2 changes: 1 addition & 1 deletion src/SIMD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const BIntegerTypes = Union{IntegerTypes, Bool}
const FloatingTypes = Union{Float32, Float64} # Float16 support is non-native in Julia and gets passed as an i16
const ScalarTypes = Union{IntegerTypes, FloatingTypes}
const VecTypes = Union{ScalarTypes, Ptr, Bool}

include("LLVM_intrinsics.jl")
include("simdvec.jl")
include("arrayops.jl")
include("precompile.jl")

end
14 changes: 14 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using SnoopPrecompile

@precompile_all_calls begin
for dim in (2, 3, 4)
v = SIMD.Vec(ntuple(i -> 0.0, dim))
v + v
v * v
1.0 * v
1.0 + v
v2 = Base.setindex(v, 2.0, 1)
muladd(v, v, v)
SIMD.constantvector(1.0, Vec{dim, Float64})
end
end

2 comments on commit d825a07

@KristofferC
Copy link
Collaborator 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.

Error while trying to register: "Tag with name v3.4.2 already exists and points to a different commit"

Please sign in to comment.