]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix types in ConsensusAlgorithmProcess 9465/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 2 Feb 2020 22:33:02 +0000 (23:33 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 2 Feb 2020 22:33:02 +0000 (23:33 +0100)
include/deal.II/base/mpi.h
include/deal.II/base/mpi_compute_index_owner_internal.h
source/base/mpi.cc

index 0ea19a9eb60f3570e876bc05096648fee38557d0..fd954ec8ccb13831da1913475f5f62f13b929d10 100644 (file)
@@ -993,7 +993,8 @@ namespace Utilities
        * @note The buffer is empty. Before using it, you have to set its size.
        */
       virtual void
-      create_request(const int other_rank, std::vector<T1> &send_buffer);
+      create_request(const unsigned int other_rank,
+                     std::vector<T1> &  send_buffer);
 
       /**
        * Prepare the buffer where the payload of the answer of the request to
@@ -1004,8 +1005,8 @@ namespace Utilities
        * @param[out] recv_buffer data to be sent part of the request (optional)
        */
       virtual void
-      prepare_buffer_for_answer(const int        other_rank,
-                                std::vector<T2> &recv_buffer);
+      prepare_buffer_for_answer(const unsigned int other_rank,
+                                std::vector<T2> &  recv_buffer);
 
       /**
        * Prepare the buffer where the payload of the answer of the request to
@@ -1032,7 +1033,8 @@ namespace Utilities
        * @param[in] recv_buffer data to be sent part of the request (optional)
        */
       virtual void
-      read_answer(const int other_rank, const std::vector<T2> &recv_buffer);
+      read_answer(const unsigned int     other_rank,
+                  const std::vector<T2> &recv_buffer);
     };
 
     /**
index b15ebb6ec53f7aa1bb5c26aa987744f7923bb573..7ecce658dccf1f2b3be483d3cf6ed2465b64780d 100644 (file)
@@ -84,7 +84,7 @@ namespace Utilities
            * Utilities::MPI::ConsensusAlgorithmProcess::create_request().
            */
           virtual void
-          create_request(const int other_rank,
+          create_request(const unsigned int other_rank,
                          std::vector<std::pair<types::global_dof_index,
                                                types::global_dof_index>>
                            &send_buffer) override
@@ -723,7 +723,7 @@ namespace Utilities
            * Utilities::MPI::ConsensusAlgorithmProcess::create_request().
            */
           virtual void
-          create_request(const int other_rank,
+          create_request(const unsigned int other_rank,
                          std::vector<std::pair<types::global_dof_index,
                                                types::global_dof_index>>
                            &send_buffer) override
@@ -747,7 +747,7 @@ namespace Utilities
            */
           virtual void
           prepare_buffer_for_answer(
-            const int                  other_rank,
+            const unsigned int         other_rank,
             std::vector<unsigned int> &recv_buffer) override
           {
             recv_buffer.resize(recv_indices[other_rank].size());
@@ -758,7 +758,7 @@ namespace Utilities
            * Utilities::MPI::ConsensusAlgorithmProcess::read_answer().
            */
           virtual void
-          read_answer(const int                        other_rank,
+          read_answer(const unsigned int               other_rank,
                       const std::vector<unsigned int> &recv_buffer) override
           {
             Assert(recv_indices[other_rank].size() == recv_buffer.size(),
index 521f4743d3e2ca0895de2e158b56d962a93cfb93..400a7874401e047bbfa6459c807433c1cf4fdf57 100644 (file)
@@ -972,7 +972,7 @@ namespace Utilities
 
     template <typename T1, typename T2>
     void
-    ConsensusAlgorithmProcess<T1, T2>::create_request(const int,
+    ConsensusAlgorithmProcess<T1, T2>::create_request(const unsigned int,
                                                       std::vector<T1> &)
     {
       // nothing to do
@@ -983,7 +983,7 @@ namespace Utilities
     template <typename T1, typename T2>
     void
     ConsensusAlgorithmProcess<T1, T2>::prepare_buffer_for_answer(
-      const int,
+      const unsigned int,
       std::vector<T2> &)
     {
       // nothing to do
@@ -993,7 +993,7 @@ namespace Utilities
 
     template <typename T1, typename T2>
     void
-    ConsensusAlgorithmProcess<T1, T2>::read_answer(const int,
+    ConsensusAlgorithmProcess<T1, T2>::read_answer(const unsigned int,
                                                    const std::vector<T2> &)
     {
       // nothing to do

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.