File tree Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
14
14
[compat ]
15
15
AbstractMCMC = " 2, 3"
16
16
Distributions = " 0.23, 0.24, 0.25"
17
- Libtask = " 0.5.3 "
17
+ Libtask = " 0.6 "
18
18
Random123 = " 1.3"
19
19
StatsFuns = " 0.9"
20
20
julia = " 1.3"
Original file line number Diff line number Diff line change 7
7
const Particle = Trace
8
8
9
9
function Trace (f, rng:: TracedRNG )
10
- ctask = let f = f
11
- Libtask. CTask () do
12
- res = f (rng)
13
- Libtask. produce (nothing )
14
- return res
15
- end
16
- end
10
+ ctask = Libtask. CTask (f, rng)
17
11
18
12
# add backward reference
19
13
newtrace = Trace (f, ctask, rng)
@@ -62,13 +56,7 @@ function forkr(trace::Trace)
62
56
newf = reset_model (trace. f)
63
57
Random123. set_counter! (trace. rng, 1 )
64
58
65
- ctask = let f = trace. ctask. task. code
66
- Libtask. CTask () do
67
- res = f ()(trace. rng)
68
- Libtask. produce (nothing )
69
- return res
70
- end
71
- end
59
+ ctask = Libtask. CTask (newf, trace. rng)
72
60
73
61
# add backward reference
74
62
newtrace = Trace (newf, ctask, trace. rng)
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9
9
[compat ]
10
10
AbstractMCMC = " 2, 3"
11
11
Distributions = " 0.24, 0.25"
12
- Libtask = " 0.5 "
12
+ Libtask = " 0.6 "
13
13
julia = " 1.3"
14
- Random123 = " 1.3"
14
+ Random123 = " 1.3"
You can’t perform that action at this time.
0 commit comments