]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/internals/smpi_replay.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless type aliases.
[simgrid.git] / src / smpi / internals / smpi_replay.cpp
index 10bb834385ba88ec003e90869b8c21263c7fdc0f..f2cf41df54e03a5555bc8c82d5105cd2505bb7cb 100644 (file)
@@ -89,29 +89,26 @@ private:
     req_storage_t store;
 
 public:
-    RequestStorage() {}
-    int size() const { return store.size(); }
+  RequestStorage() = default;
+  int size() const { return store.size(); }
 
-    req_storage_t& get_store()
-    {
-      return store;
-    }
+  req_storage_t& get_store() { return store; }
 
-    void get_requests(std::vector<MPI_Request>& vec) const
-    {
-      for (auto const& pair : store) {
-        auto& req = pair.second;
-        auto my_proc_id = simgrid::s4u::this_actor::get_pid();
-        if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
-          vec.push_back(pair.second);
-          pair.second->print_request("MM");
-        }
+  void get_requests(std::vector<MPI_Request>& vec) const
+  {
+    for (auto const& pair : store) {
+      auto& req       = pair.second;
+      auto my_proc_id = simgrid::s4u::this_actor::get_pid();
+      if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
+        vec.push_back(pair.second);
+        pair.second->print_request("MM");
       }
     }
+  }
 
     MPI_Request find(int src, int dst, int tag)
     {
-      req_storage_t::iterator it = store.find(req_key_t(src, dst, tag));
+      auto it = store.find(req_key_t(src, dst, tag));
       return (it == store.end()) ? MPI_REQUEST_NULL : it->second;
     }
 
@@ -567,7 +564,7 @@ void WaitAllAction::kernel(simgrid::xbt::ReplayAction&)
     req_storage.get_requests(reqs);
     for (auto const& req : reqs) {
       if (req && (req->flags() & MPI_REQ_RECV)) {
-        sender_receiver.push_back({req->src(), req->dst()});
+        sender_receiver.emplace_back(req->src(), req->dst());
       }
     }
     Request::waitall(count_requests, &(reqs.data())[0], MPI_STATUSES_IGNORE);