Skip to content

Commit adff799

Browse files
committed
Formatting and remove unnecessary import
1 parent 172e463 commit adff799

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

perf/benchmark.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ benchmark_driver!(ackley, x)
7373
function generate_matrix_test(n)
7474
return (x, callback=nothing) -> begin
7575
# @assert length(x) == 2n^2 + n
76-
a = reshape(x[1:(n^2)], n, n)
77-
b = reshape(x[(n^2 + 1):(2n^2)], n, n)
76+
a = reshape(x[1:(n ^ 2)], n, n)
77+
b = reshape(x[(n ^ 2 + 1):(2n ^ 2)], n, n)
7878
ret = log.((a * b) + a - b)
7979
callback !== nothing && callback(ret)
8080
return ret
@@ -83,7 +83,7 @@ end
8383

8484
n = 100
8585
matrix_test = generate_matrix_test(n)
86-
x = collect(1.0:(2n^2 + n))
86+
x = collect(1.0:(2n ^ 2 + n))
8787
benchmark_driver!(matrix_test, x; f_displayname="matrix_test")
8888

8989
####################################################################

src/test_utils.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module TestUtils
22

33
using ..Libtask
44
using Test
5-
using ..Libtask: TapedTask
65

76
# Function barrier to ensure inference in value types.
87
function count_allocs(f::F, x::Vararg{Any,N}) where {F,N}
@@ -203,12 +202,7 @@ function test_cases()
203202
allocs,
204203
),
205204
Testcase(
206-
"rosenbrock",
207-
nothing,
208-
(rosenbrock, rand(100_000), nothing),
209-
nothing,
210-
[],
211-
none,
205+
"rosenbrock", nothing, (rosenbrock, rand(100_000), nothing), nothing, [], none
212206
),
213207
]
214208
end

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function optimise_ir!(ir::IRCode; show_ir=false, do_inline=true)
5454
inline_state = CC.InliningState(local_interp)
5555
CC.verify_ir(ir)
5656
if do_inline
57-
ir = CC.ssa_inlining_pass!(ir, inline_state, true) #=propagate_inbounds=#
57+
ir = CC.ssa_inlining_pass!(ir, inline_state, true)#=propagate_inbounds=#
5858
ir = CC.compact!(ir)
5959
end
6060
ir = __strip_coverage!(ir)
@@ -96,7 +96,7 @@ end
9696
# Run type inference and constant propagation on the ir. Credit to @oxinabox:
9797
# https://gist.github.com/oxinabox/cdcffc1392f91a2f6d80b2524726d802#file-example-jl-L54
9898
function __infer_ir!(ir, interp::CC.AbstractInterpreter, mi::CC.MethodInstance)
99-
method_info = CC.MethodInfo(true, nothing) #=propagate_inbounds=#
99+
method_info = CC.MethodInfo(true, nothing)#=propagate_inbounds=#
100100
min_world = world = get_inference_world(interp)
101101
max_world = Base.get_world_counter()
102102
irsv = CC.IRInterpretationState(

0 commit comments

Comments
 (0)