Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove useless header inclusions
[simgrid.git] / src / simdag / sd_workstation.cpp
index 1c54dcd..e77d274 100644 (file)
@@ -4,14 +4,9 @@
 /* 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. */
 
-#include "src/surf/host_interface.hpp"
 #include "src/simdag/simdag_private.h"
-#include "simgrid/simdag.h"
-#include "simgrid/host.h"
-#include <simgrid/s4u/host.hpp>
-#include "xbt/dict.h"
-#include "xbt/lib.h"
-#include "xbt/sysdep.h"
+#include "simgrid/s4u/host.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "surf/surf.h"
 
 /** @brief Returns the route between two workstations
@@ -27,7 +22,8 @@ SD_link_t *SD_route_get_list(sg_host_t src, sg_host_t dst)
 {
   void *surf_link;
   unsigned int cpt;
-  xbt_dynar_t surf_route = surf_host_model_get_route((surf_host_model_t)surf_host_model, src, dst);
+  xbt_dynar_t surf_route = NULL;
+  routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard, &surf_route, NULL);
 
   SD_link_t *list = xbt_new(SD_link_t, xbt_dynar_length(surf_route));
   xbt_dynar_foreach(surf_route, cpt, surf_link) {
@@ -46,7 +42,9 @@ SD_link_t *SD_route_get_list(sg_host_t src, sg_host_t dst)
  */
 int SD_route_get_size(sg_host_t src, sg_host_t dst)
 {
-  return xbt_dynar_length(surf_host_model_get_route((surf_host_model_t)surf_host_model, src, dst));
+  xbt_dynar_t surf_route = NULL;
+  routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard, &surf_route, NULL);
+  return xbt_dynar_length(surf_route);
 }
 
 /**