Skip to content

Commit 4cb3334

Browse files
committed
Fix tests.
1 parent 8023224 commit 4cb3334

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/p_vector.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -803,14 +803,13 @@ function Base.copy!(a::PVector,b::PVector)
803803
end
804804

805805
function Base.copyto!(a::PVector,b::PVector)
806-
map(copy!,own_values(a),own_values(b))
807-
#if partition(axes(a,1)) === partition(axes(b,1))
808-
# map(copy!,partition(a),partition(b))
809-
#elseif matching_own_indices(axes(a,1),axes(b,1))
810-
# map(copy!,own_values(a),own_values(b))
811-
#else
812-
# error("Trying to copy a PVector into another one with a different data layout. This case is not implemented yet. It would require communications.")
813-
#end
806+
if partition(axes(a,1)) === partition(axes(b,1))
807+
map(copy!,partition(a),partition(b))
808+
elseif matching_own_indices(axes(a,1),axes(b,1))
809+
map(copy!,own_values(a),own_values(b))
810+
else
811+
error("Trying to copy a PVector into another one with a different data layout. This case is not implemented yet. It would require communications.")
812+
end
814813
a
815814
end
816815

0 commit comments

Comments
 (0)