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))
2525
2626 print (" Run TapedTask: " )
2727 x = (x[1 : end - 1 ]. .. , produce);
28- tf = Libtask. TapedFunction (f, x... );
2928 # 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... );
3231 c = 0
3332 while consume (tt)!= = nothing
3433 c+= 1
3534 end
3635 verbose && print (" #produce=" , c, " ; " );
3736 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)
4041 GC. gc ()
4142end
4243
You can’t perform that action at this time.
0 commit comments