Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
reduce the amount of includes
[simgrid.git] / src / smpi / smpi_request.cpp
index 40ae6cd..b0a857d 100644 (file)
@@ -3,17 +3,17 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <xbt/config.hpp>
-#include <algorithm>
-#include "private.h"
 #include "mc/mc.h"
 #include "src/mc/mc_replay.h"
-#include "src/simix/smx_private.h"
-#include "simgrid/sg_config.h"
-#include "smpi/smpi_utils.hpp"
 #include "src/smpi/SmpiHost.hpp"
-#include <simgrid/s4u/host.hpp>
 #include "src/kernel/activity/SynchroComm.hpp"
+#include "src/smpi/smpi_comm.hpp"
+#include "src/smpi/smpi_datatype.hpp"
+#include "src/smpi/smpi_op.hpp"
+#include "src/smpi/smpi_process.hpp"
+#include "src/smpi/smpi_request.hpp"
+
+#include <algorithm>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_request, smpi, "Logging specific to SMPI (reques)");
 
@@ -517,24 +517,22 @@ int Request::test(MPI_Request * request, MPI_Status * status) {
 
 int Request::testsome(int incount, MPI_Request requests[], int *indices, MPI_Status status[])
 {
-  int i;
   int count = 0;
   int count_dead = 0;
   MPI_Status stat;
   MPI_Status *pstat = status == MPI_STATUSES_IGNORE ? MPI_STATUS_IGNORE : &stat;
 
-  for(i = 0; i < incount; i++) {
-    if((requests[i] != MPI_REQUEST_NULL)) {
-      if(test(&requests[i], pstat)) {
-         indices[i] = 1;
-         count++;
-         if(status != MPI_STATUSES_IGNORE) {
-           status[i] = *pstat;
-         }
-         if ((requests[i] != MPI_REQUEST_NULL) && requests[i]->flags_ & NON_PERSISTENT)
-         requests[i]=MPI_REQUEST_NULL;
+  for (int i = 0; i < incount; i++) {
+    if (requests[i] != MPI_REQUEST_NULL) {
+      if (test(&requests[i], pstat)) {
+        indices[i] = 1;
+        count++;
+        if (status != MPI_STATUSES_IGNORE)
+          status[i] = *pstat;
+        if ((requests[i] != MPI_REQUEST_NULL) && requests[i]->flags_ & NON_PERSISTENT)
+          requests[i] = MPI_REQUEST_NULL;
       }
-    }else{
+    } else {
       count_dead++;
     }
   }