1
- import SnoopPrecompile : @precompile_all_calls , @precompile_setup
1
+ import PrecompileTools : @compile_workload , @setup_workload
2
2
3
3
macro ignore_domain_error (ex)
4
4
return esc (
@@ -163,9 +163,9 @@ function test_functions_on_trees(::Type{T}, operators) where {T}
163
163
return nothing
164
164
end
165
165
166
- macro maybe_precompile_setup (mode, ex)
166
+ macro maybe_setup_workload (mode, ex)
167
167
precompile_ex = Expr (
168
- :macrocall , Symbol (" @precompile_setup " ), LineNumberNode (@__LINE__ ), ex
168
+ :macrocall , Symbol (" @setup_workload " ), LineNumberNode (@__LINE__ ), ex
169
169
)
170
170
return quote
171
171
if $ (esc (mode)) == :compile
@@ -178,9 +178,9 @@ macro maybe_precompile_setup(mode, ex)
178
178
end
179
179
end
180
180
181
- macro maybe_precompile_all_calls (mode, ex)
181
+ macro maybe_compile_workload (mode, ex)
182
182
precompile_ex = Expr (
183
- :macrocall , Symbol (" @precompile_all_calls " ), LineNumberNode (@__LINE__ ), ex
183
+ :macrocall , Symbol (" @compile_workload " ), LineNumberNode (@__LINE__ ), ex
184
184
)
185
185
return quote
186
186
if $ (esc (mode)) == :compile
@@ -195,12 +195,12 @@ end
195
195
196
196
""" `mode=:precompile` will use `@precompile_*` directives; `mode=:compile` runs."""
197
197
function do_precompilation (; mode= :precompile )
198
- @maybe_precompile_setup mode begin
198
+ @maybe_setup_workload mode begin
199
199
binary_operators = [[+ , - , * , / ]]
200
200
unary_operators = [[sin, cos]]
201
201
turbo = [false ]
202
202
types = [Float32, Float64]
203
- @maybe_precompile_all_calls mode begin
203
+ @maybe_compile_workload mode begin
204
204
test_all_combinations (;
205
205
binary_operators= binary_operators,
206
206
unary_operators= unary_operators,
@@ -216,7 +216,7 @@ function do_precompilation(; mode=:precompile)
216
216
# Want to precompile all above calls.
217
217
types = [Float32, Float64]
218
218
for T in types
219
- @maybe_precompile_all_calls mode begin
219
+ @maybe_compile_workload mode begin
220
220
test_functions_on_trees (T, operators)
221
221
end
222
222
end
0 commit comments