Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / examples / deprecated / simdag / test / sd_test.cpp
index 8fd8b55..a766648 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -43,11 +43,11 @@ int main(int argc, char **argv)
     XBT_INFO("   Link %s: latency = %f, bandwidth = %f", sg_link_get_name(link), sg_link_get_latency(link),
              sg_link_get_bandwidth(link));
 
-  XBT_INFO("Route latency = %f, route bandwidth = %f", latency, sg_host_route_bandwidth(h1, h2));
+  XBT_INFO("Route latency = %f, route bandwidth = %f", latency, sg_host_get_route_bandwidth(h1, h2));
   XBT_INFO("Communication time for %f bytes between %s and %s: %f", comm_amount12, h1->get_cname(), h2->get_cname(),
-           sg_host_route_latency(h1, h2) + comm_amount12 / sg_host_route_bandwidth(h1, h2));
+           sg_host_get_route_latency(h1, h2) + comm_amount12 / sg_host_get_route_bandwidth(h1, h2));
   XBT_INFO("Communication time for %f bytes between %s and %s: %f", comm_amount21, h2->get_cname(), h1->get_cname(),
-           sg_host_route_latency(h2, h1) + comm_amount21 / sg_host_route_bandwidth(h2, h1));
+           sg_host_get_route_latency(h2, h1) + comm_amount21 / sg_host_get_route_bandwidth(h2, h1));
 
   /* creation of the tasks and their dependencies */
   SD_task_t taskA = SD_task_create("Task A", nullptr, 10.0);
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
   SD_task_t taskD = SD_task_create("Task D", nullptr, 60.0);
 
   /* try to attach and retrieve user data to a task */
-  SD_task_set_data(taskA, static_cast<void*>(&comp_amount1));
+  SD_task_set_data(taskA, &comp_amount1);
   if (fabs(comp_amount1 - (*(static_cast<double*>(SD_task_get_data(taskA))))) > 1e-12)
       XBT_ERROR("User data was corrupted by a simple set/get");