Skip to content

Commit

Permalink
Skip recreating N_Vector in AmiVector::copy (#2363)
Browse files Browse the repository at this point in the history
We only copy if the sizes match. Since the std::vector is not reallocated, there is no need to recreate the N_Vector.
  • Loading branch information
dweindl authored Mar 7, 2024
1 parent 8d65524 commit 3dded5c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ void AmiVector::copy(AmiVector const& other) {
getLength(), other.getLength()
);
std::copy(other.vec_.begin(), other.vec_.end(), vec_.begin());
synchroniseNVector();
}

void AmiVector::synchroniseNVector() {
Expand Down

0 comments on commit 3dded5c

Please sign in to comment.