Skip to content

Remove assertions in "src/precompile.jl" #254

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

Merged
merged 1 commit into from
Aug 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ function _precompile_()
realtypes = (Float16, Float32, Float64, Int) # types for mixed Normed/Real operations
for T in normedtypes
for f in (+, -, abs, eps, rand) # unary operations
@assert precompile(Tuple{typeof(f),T})
precompile(Tuple{typeof(f),T})
end
@assert precompile(Tuple{typeof(rand),T,Tuple{Int}})
@assert precompile(Tuple{typeof(rand),T,Tuple{Int,Int}})
precompile(Tuple{typeof(rand),T,Tuple{Int}})
precompile(Tuple{typeof(rand),T,Tuple{Int,Int}})
for f in (trunc, floor, ceil, round) # rounding operations
@assert precompile(Tuple{typeof(f),T})
@assert precompile(Tuple{typeof(f),Type{Int},T})
precompile(Tuple{typeof(f),T})
precompile(Tuple{typeof(f),Type{Int},T})
end
for f in (+, -, *, /, <, <=, ==) # binary operations
@assert precompile(Tuple{typeof(f),T,T})
precompile(Tuple{typeof(f),T,T})
for S in realtypes
@assert precompile(Tuple{typeof(f),T,S})
@assert precompile(Tuple{typeof(f),S,T})
precompile(Tuple{typeof(f),T,S})
precompile(Tuple{typeof(f),S,T})
end
end
# conversions
for S in realtypes
@assert precompile(Tuple{Type{T},S})
@assert precompile(Tuple{Type{S},T})
@assert precompile(Tuple{typeof(convert),Type{T},S})
@assert precompile(Tuple{typeof(convert),Type{S},T})
precompile(Tuple{Type{T},S})
precompile(Tuple{Type{S},T})
precompile(Tuple{typeof(convert),Type{T},S})
precompile(Tuple{typeof(convert),Type{S},T})
end
end
end