Skip to content

Commit 129ccd9

Browse files
committed
Fix split(VariableOrderAccumulator)
1 parent 418c894 commit 129ccd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/default_accumulators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ accumulator_name(::Type{<:VariableOrderAccumulator}) = :VariableOrder
123123

124124
split(::LogPriorAccumulator{T}) where {T} = LogPriorAccumulator(zero(T))
125125
split(::LogLikelihoodAccumulator{T}) where {T} = LogLikelihoodAccumulator(zero(T))
126-
split(acc::VariableOrderAccumulator) = acc
126+
split(acc::VariableOrderAccumulator) = copy(acc)
127127

128128
function combine(acc::LogPriorAccumulator, acc2::LogPriorAccumulator)
129129
return LogPriorAccumulator(acc.logp + acc2.logp)
@@ -132,7 +132,7 @@ function combine(acc::LogLikelihoodAccumulator, acc2::LogLikelihoodAccumulator)
132132
return LogLikelihoodAccumulator(acc.logp + acc2.logp)
133133
end
134134
function combine(acc::VariableOrderAccumulator, acc2::VariableOrderAccumulator)
135-
# Note that assumptions are not allowed within in parallelised blocks, and thus the
135+
# Note that assumptions are not allowed in parallelised blocks, and thus the
136136
# dictionaries should be identical.
137137
return VariableOrderAccumulator(
138138
max(acc.num_produce, acc2.num_produce), merge(acc.order, acc2.order)

0 commit comments

Comments
 (0)