File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,9 @@ using ImageCore.OffsetArrays
9
9
include (" restrict.jl" )
10
10
include (" compat.jl" )
11
11
12
+ if VERSION >= v " 1.4.2" # work around https://github.com/JuliaLang/julia/issues/34121
13
+ include (" precompile.jl" )
14
+ _precompile_ ()
15
+ end
16
+
12
17
end
Original file line number Diff line number Diff line change
1
+ macro warnpcfail (ex:: Expr )
2
+ modl = __module__
3
+ file = __source__. file === nothing ? " ?" : String (__source__. file)
4
+ line = __source__. line
5
+ quote
6
+ $ (esc (ex)) || @warn """ precompile directive
7
+ $($ (Expr (:quote , ex)))
8
+ failed. Please report an issue in $($ modl) (after checking for duplicates) or remove this directive.""" _file= $ file _line= $ line
9
+ end
10
+ end
11
+
12
+ function _precompile_ ()
13
+ for ST in (N0f8, Float32, Float64)
14
+ for T in (Gray{ST}, RGB{ST})
15
+ @warnpcfail precompile (restrict, (Vector{T},))
16
+ @warnpcfail precompile (restrict, (Matrix{T},))
17
+ end
18
+ end
19
+ end # _precompile_
You can’t perform that action at this time.
0 commit comments