Skip to content

Commit

Permalink
Merge f4cef27 into 955a562
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericWantiez committed Nov 9, 2023
2 parents 955a562 + f4cef27 commit 055f647
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AdvancedPS"
uuid = "576499cb-2369-40b2-a588-c64705576edc"
authors = ["TuringLang"]
version = "0.5.3"
version = "0.5.4"

[deps]
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
Expand Down
7 changes: 6 additions & 1 deletion ext/AdvancedPSLibtaskExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ function AdvancedPS.LibtaskModel(
)
end

"""
copy(model::AdvancedPS.LibtaskModel)
The task is copied (forked) and the inner model is deepcopied.
"""
function Base.copy(model::AdvancedPS.LibtaskModel)
return AdvancedPS.LibtaskModel(model.f, copy(model.ctask))
return AdvancedPS.LibtaskModel(deepcopy(model.f), copy(model.ctask))
end

const LibtaskTrace{R} = AdvancedPS.Trace{<:AdvancedPS.LibtaskModel,R}
Expand Down

0 comments on commit 055f647

Please sign in to comment.