]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Pass arg by value in create_ascending_partitioning
authorDoug Shi-Dong <doug.shidong@gmail.com>
Fri, 1 May 2020 03:32:53 +0000 (23:32 -0400)
committerDoug Shi-Dong <doug.shidong@gmail.com>
Sun, 3 May 2020 23:57:32 +0000 (19:57 -0400)
As per
https://github.com/dealii/dealii/pull/9991#issuecomment-622199929.

include/deal.II/base/mpi.h
source/base/mpi.cc

index 589260d15cc1a8f61c34642c5216bedaa3bd7de0..68bdb8e12bdd8b5ea4433e6d197f8149f24ea76c 100644 (file)
@@ -428,8 +428,8 @@ namespace Utilities
      * process p.
      */
     std::vector<IndexSet>
-    create_ascending_partitioning(const MPI_Comm &           comm,
-                                  const IndexSet::size_type &local_size);
+    create_ascending_partitioning(const MPI_Comm &          comm,
+                                  const IndexSet::size_type local_size);
 
 #ifdef DEAL_II_WITH_MPI
     /**
index f8cddf8b7f9ee595307713ff74adb154c6ef47da..9295a2c0c8d91d5a971ae44f7b415e2c3dd1df0a 100644 (file)
@@ -222,8 +222,8 @@ namespace Utilities
 
 
     std::vector<IndexSet>
-    create_ascending_partitioning(const MPI_Comm &           comm,
-                                  const IndexSet::size_type &local_size)
+    create_ascending_partitioning(const MPI_Comm &          comm,
+                                  const IndexSet::size_type local_size)
     {
       const unsigned int                     n_proc = n_mpi_processes(comm);
       const std::vector<IndexSet::size_type> sizes =
@@ -659,7 +659,7 @@ namespace Utilities
 
     std::vector<IndexSet>
     create_ascending_partitioning(const MPI_Comm & /*comm*/,
-                                  const IndexSet::size_type &local_size)
+                                  const IndexSet::size_type local_size)
     {
       return std::vector<IndexSet>(1, complete_index_set(local_size));
     }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.