return task;
}
-/** @brief create a end-to-end communication task that can then be auto-scheduled
+/** @brief create an end-to-end communication task that can then be auto-scheduled
*
* Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
* creation, and decouple them from the scheduling process where you just specify which resource should deliver the
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());
}