-/* 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
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;
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());
}