Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Another C wrapper falls.
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 22 Feb 2016 02:54:23 +0000 (03:54 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 22 Feb 2016 02:54:23 +0000 (03:54 +0100)
src/include/surf/surf.h
src/simdag/sd_workstation.cpp
src/surf/surf_c_bindings.cpp

index 441a406..92434bc 100644 (file)
@@ -211,10 +211,6 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t mode
  */
 XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
 
-/** @brief Get the route (dynar of sg_link_t) between two hosts */
-XBT_PUBLIC(xbt_dynar_t) surf_host_model_get_route(
-  surf_host_model_t model, sg_host_t src, sg_host_t dst);
-
 /** @brief Create a new VM on the specified host */
 XBT_PUBLIC(void) surf_vm_model_create(const char *name, sg_host_t host_PM);
 
index 1c54dcd..a0fe6ec 100644 (file)
@@ -27,7 +27,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 +47,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);
 }
 
 /**
index 25e73e8..20e209b 100644 (file)
@@ -181,13 +181,6 @@ int surf_model_running_action_set_size(surf_model_t model){
   return model->getRunningActionSet()->size();
 }
 
-xbt_dynar_t surf_host_model_get_route(surf_host_model_t /*model*/,
-                                             sg_host_t src, sg_host_t dst){
-  xbt_dynar_t route = NULL;
-  routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard, &route, NULL);
-  return route;
-}
-
 void surf_vm_model_create(const char *name, sg_host_t ind_phys_host){
   surf_vm_model->createVM(name, ind_phys_host);
 }