File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ ThreadSafeVarInfo(vi::ThreadSafeVarInfo) = vi
1717# just update the array of log probabilities.
1818function acclogp! (vi:: ThreadSafeVarInfo , logp)
1919 vi. logps[Threads. threadid ()] += logp
20- return getlogp (vi)
20+ return vi
2121end
2222
2323# The current log probability of the variables has to be computed from
Original file line number Diff line number Diff line change @@ -602,15 +602,21 @@ getlogp(vi::AbstractVarInfo) = vi.logp[]
602602Set the log of the joint probability of the observed data and parameters sampled in
603603`vi` to `logp`.
604604"""
605- setlogp! (vi:: VarInfo , logp) = vi. logp[] = logp
605+ function setlogp! (vi:: VarInfo , logp)
606+ vi. logp[] = logp
607+ return vi
608+ end
606609
607610"""
608611 acclogp!(vi::VarInfo, logp)
609612
610613Add `logp` to the value of the log of the joint probability of the observed data and
611614parameters sampled in `vi`.
612615"""
613- acclogp! (vi:: VarInfo , logp) = vi. logp[] += logp
616+ function acclogp! (vi:: VarInfo , logp)
617+ vi. logp[] += logp
618+ return vi
619+ end
614620
615621"""
616622 resetlogp!(vi::AbstractVarInfo)
You can’t perform that action at this time.
0 commit comments