Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions src/Ark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ export Relationship

export Storage, StructArray, GPUStructArray, GPUVector

export shallow_copy

end
2 changes: 1 addition & 1 deletion src/storage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end
push!(exprs, :(push!(new_vec, old_vec[old_row])))
elseif CP === Val{:copy} || all(T -> isbitstype(T), fieldtypes(C))
# no deep copy required for types with all isbits fields
push!(exprs, :(push!(new_vec, _shallow_copy(old_vec[old_row]))))
push!(exprs, :(push!(new_vec, shallow_copy(old_vec[old_row]))))
else # CP === Val{:deepcopy}
# validity if checked before the call.
push!(exprs, :(push!(new_vec, deepcopy(old_vec[old_row]))))
Expand Down
2 changes: 1 addition & 1 deletion src/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function _format_type(T)
end
end

@generated function _shallow_copy(x::T) where T
@generated function shallow_copy(x::T) where T
if T == Symbol || T == String
return :(x)
end
Expand Down
Loading