Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Storage-kill: no more check disk attachement
[simgrid.git] / src / simdag / sd_task.cpp
index d57878b..4680e5e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2020. The SimGrid Team.
+/* Copyright (c) 2006-2021. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -691,8 +691,8 @@ double SD_task_get_execution_time(const_SD_task_t /*task*/, int host_count, cons
     if (bytes_amount != nullptr)
       for (int j = 0; j < host_count; j++)
         if (bytes_amount[i * host_count + j] != 0)
-          time += (sg_host_route_latency(host_list[i], host_list[j]) +
-                   bytes_amount[i * host_count + j] / sg_host_route_bandwidth(host_list[i], host_list[j]));
+          time += (sg_host_get_route_latency(host_list[i], host_list[j]) +
+                   bytes_amount[i * host_count + j] / sg_host_get_route_bandwidth(host_list[i], host_list[j]));
 
     if (time > max_time)
       max_time = time;
@@ -962,12 +962,11 @@ void SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list)
 void SD_task_schedulel(SD_task_t task, int count, ...)
 {
   va_list ap;
-  auto* list = new sg_host_t[count];
+  std::vector<sg_host_t> list(count);
   va_start(ap, count);
   for (int i=0; i<count; i++)
     list[i] = va_arg(ap, sg_host_t);
 
   va_end(ap);
-  SD_task_schedulev(task, count, list);
-  delete[] list;
+  SD_task_schedulev(task, count, list.data());
 }