From: David Wells Date: Mon, 15 Feb 2021 18:34:46 +0000 (-0500) Subject: Use ArrayViews directly instead of pointers. X-Git-Tag: v9.3.0-rc1~442^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd3c52b322ffbc309fe6139c4a7bd9fb2e41c9d5;p=dealii.git Use ArrayViews directly instead of pointers. --- diff --git a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h index 0b0426e526..96aed47bb0 100644 --- a/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h +++ b/include/deal.II/base/mpi_noncontiguous_partitioner.templates.h @@ -321,15 +321,13 @@ namespace Utilities AssertThrowMPI(ierr); } - auto src_iterator = src.begin(); - // post send for (types::global_dof_index i = 0, k = 0; i < send_ranks.size(); i++) { // collect data to be send for (types::global_dof_index j = send_ptr[i]; j < send_ptr[i + 1]; j++) - buffers[j] = src_iterator[send_indices[k++]]; + buffers[j] = src[send_indices[k++]]; // send data const auto ierr = @@ -360,8 +358,6 @@ namespace Utilities (void)requests; Assert(false, ExcNeedsMPI()); #else - auto dst_iterator = dst.begin(); - // receive all data packages and copy data from buffers for (types::global_dof_index proc = 0; proc < recv_ranks.size(); proc++) { @@ -376,7 +372,7 @@ namespace Utilities for (types::global_dof_index j = recv_ptr[i], c = 0; j < recv_ptr[i + 1]; j++) - dst_iterator[recv_indices[j]] = buffers[recv_ptr[i] + c++]; + dst[recv_indices[j]] = buffers[recv_ptr[i] + c++]; } // wait that all data packages have been sent