From: Matthias Maier Date: Sun, 26 Jun 2022 05:37:35 +0000 (-0500) Subject: fix a warning when compiling with cuda support X-Git-Tag: v9.5.0-rc1~1151^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14049%2Fhead;p=dealii.git fix a warning when compiling with cuda support dealii/include/deal.II/matrix_free/cuda_matrix_free.templates.h:1027:17: warning: loop variable ‘cell’ creates a copy from type ‘const dealii::TriaActiveIterator >’ [-Wrange-loop-construct] dealii/include/deal.II/matrix_free/cuda_matrix_free.templates.h:1027:17: note: use reference type to prevent copying 1027 | for (const auto cell : | ^~~~ | & --- diff --git a/include/deal.II/matrix_free/cuda_matrix_free.templates.h b/include/deal.II/matrix_free/cuda_matrix_free.templates.h index 12b7bbf039..fd6f41d00a 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.templates.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.templates.h @@ -1024,7 +1024,7 @@ namespace CUDAWrappers std::vector ghost_vertices( dof_handler->get_triangulation().n_vertices(), false); - for (const auto cell : + for (const auto &cell : dof_handler->get_triangulation().active_cell_iterators()) if (cell->is_ghost()) for (unsigned int i = 0;