From 3d5aa6e574c34c9c1b52001545d2a7cd9bfce434 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 22 Feb 2016 03:54:23 +0100 Subject: [PATCH 1/1] Another C wrapper falls. --- src/include/surf/surf.h | 4 ---- src/simdag/sd_workstation.cpp | 7 +++++-- src/surf/surf_c_bindings.cpp | 7 ------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 441a40603c..92434bce1e 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -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); diff --git a/src/simdag/sd_workstation.cpp b/src/simdag/sd_workstation.cpp index 1c54dcd7c9..a0fe6ec165 100644 --- a/src/simdag/sd_workstation.cpp +++ b/src/simdag/sd_workstation.cpp @@ -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); } /** diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 25e73e8334..20e209bac5 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -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); } -- 2.20.1