Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/modeling_library/vector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ end
@inline has_value(choices::VectorTraceChoiceMap, addr::Pair) = _has_value(choices, addr)
@inline get_values_shallow(::VectorTraceChoiceMap) = ()

function _fill_array!(chm::VectorTraceChoiceMap, v::Vector{T}, start_idx::Int64) where T
idx = start_idx
tr = chm.trace
for k in 1 : tr.len
sub_tr = tr.subtraces[k]
sub_chm = get_choices(sub_tr)
n = _fill_array!(sub_chm, v, idx)
idx += n
end
return idx - start_idx
end

############################################
# code shared by vector-shaped combinators #
Expand Down