Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 9 Aug 2016 07:51:28 +0000 (09:51 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 9 Aug 2016 07:57:01 +0000 (09:57 +0200)
src/simdag/sd_task.cpp
src/simdag/simdag_private.h

index e1fcd29..bb66feb 100644 (file)
@@ -800,8 +800,10 @@ void SD_task_run(SD_task_t task)
   int host_nb = task->allocation->size();
   sg_host_t *hosts = xbt_new(sg_host_t, host_nb);
   int i =0;
-  for (auto host: *task->allocation)
-    hosts[i++] = host;
+  for (auto host: *task->allocation){
+    hosts[i] = host;
+    i++;
+  }
 
   double *flops_amount = xbt_new0(double, host_nb);
   double *bytes_amount = xbt_new0(double, host_nb * host_nb);
index 380ca67..d2c66c3 100644 (file)
@@ -28,8 +28,9 @@ typedef struct SD_global {
   std::set<SD_task_t> *completed_tasks;
 
   xbt_dynar_t return_set;
+} s_SD_global_t;
 
-} s_SD_global_t, *SD_global_t;
+typedef struct SD_global *SD_global_t;
 
 extern XBT_PRIVATE SD_global_t sd_global;