File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,19 @@ function benchmark_driver!(f, x...; f_displayname=string(f))
25
25
26
26
print (" Run TapedTask: " )
27
27
x = (x[1 : end - 1 ]. .. , produce);
28
- tf = Libtask. TapedFunction (f, x... );
29
28
# show the number of produce calls inside `f`
30
- f_task = (tf , x; verbose= false ) -> begin
31
- tt = TapedTask (tf , x... );
29
+ f_task = (f , x; verbose= false ) -> begin
30
+ tt = TapedTask (f , x... );
32
31
c = 0
33
32
while consume (tt)!= = nothing
34
33
c+= 1
35
34
end
36
35
verbose && print (" #produce=" , c, " ; " );
37
36
end
38
- f_task (tf, x; verbose= true ) # print #produce calls.
39
- @btime $ f_task ($ tf, $ x)
37
+ # Note that we need to pass `f` instead of `tf` to avoid
38
+ # default continuation in `TapedTask` constructor
39
+ f_task (f, x; verbose= true ) # print #produce calls
40
+ @btime $ f_task ($ f, $ x)
40
41
GC. gc ()
41
42
end
42
43
You can’t perform that action at this time.
0 commit comments