From dfc2ee22f0534999a2b6ac38254fc840c6e0a536 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 26 Jun 2022 00:37:35 -0500 Subject: [PATCH] fix a warning when compiling with cuda support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 : | ^~~~ | & --- include/deal.II/matrix_free/cuda_matrix_free.templates.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5