* 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. */
#include "surf_routing_cluster.hpp"
* 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. */
#include "surf_routing_cluster.hpp"
-void AsCluster::getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t route, double *lat)
+void AsCluster::getRouteAndLatency(RoutingEdge *src, RoutingEdge *dst, sg_platf_route_cbarg_t route, double *lat)
{
s_surf_parsing_link_up_down_t info;
XBT_VERB("cluster_get_route_and_latency from '%s'[%d] to '%s'[%d]",
{
s_surf_parsing_link_up_down_t info;
XBT_VERB("cluster_get_route_and_latency from '%s'[%d] to '%s'[%d]",
info = xbt_dynar_get_as(p_linkUpDownList, src->getId() * p_nb_links_per_node, s_surf_parsing_link_up_down_t);
xbt_dynar_push_as(route->link_list, void *, info.link_up);
if (lat)
info = xbt_dynar_get_as(p_linkUpDownList, src->getId() * p_nb_links_per_node, s_surf_parsing_link_up_down_t);
xbt_dynar_push_as(route->link_list, void *, info.link_up);
if (lat)
if (info.link_up) { // link up
xbt_dynar_push_as(route->link_list, void *, info.link_up);
if (lat)
if (info.link_up) { // link up
xbt_dynar_push_as(route->link_list, void *, info.link_up);
if (lat)
- xbt_dynar_push_as(route->link_list, void *, static_cast<ResourcePtr>(p_backbone));
+ xbt_dynar_push_as(route->link_list, void *,
+ static_cast<simgrid::surf::Resource*>(p_backbone));
if (info.link_down) { // link down
xbt_dynar_push_as(route->link_list, void *, info.link_down);
if (lat)
if (info.link_down) { // link down
xbt_dynar_push_as(route->link_list, void *, info.link_down);
if (lat)
}
if (p_has_limiter){ // limiter for receiver
info = xbt_dynar_get_as(p_linkUpDownList, dst->getId() * p_nb_links_per_node + p_has_loopback, s_surf_parsing_link_up_down_t);
}
if (p_has_limiter){ // limiter for receiver
info = xbt_dynar_get_as(p_linkUpDownList, dst->getId() * p_nb_links_per_node + p_has_loopback, s_surf_parsing_link_up_down_t);
xbt_node_t current, previous, backboneNode = NULL, routerNode;
s_surf_parsing_link_up_down_t info;
xbt_node_t current, previous, backboneNode = NULL, routerNode;
s_surf_parsing_link_up_down_t info;
if (src->getRcType() != SURF_NETWORK_ELEMENT_ROUTER) {
previous = new_xbt_graph_node(graph, src->getName(), nodes);
if (src->getRcType() != SURF_NETWORK_ELEMENT_ROUTER) {
previous = new_xbt_graph_node(graph, src->getName(), nodes);
current = new_xbt_graph_node(graph, link_name, nodes);
new_xbt_graph_edge(graph, previous, current, edges);
current = new_xbt_graph_node(graph, link_name, nodes);
new_xbt_graph_edge(graph, previous, current, edges);
current = new_xbt_graph_node(graph, link_name, nodes);
new_xbt_graph_edge(graph, previous, current, edges);
current = new_xbt_graph_node(graph, link_name, nodes);
new_xbt_graph_edge(graph, previous, current, edges);
}
void AsCluster::create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int , int position){
}
void AsCluster::create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int , int position){
s_surf_parsing_link_up_down_t info;
char* link_id = bprintf("%s_link_%d", cluster->id, id);
s_surf_parsing_link_up_down_t info;
char* link_id = bprintf("%s_link_%d", cluster->id, id);
if (link.policy == SURF_LINK_FULLDUPLEX) {
char *tmp_link = bprintf("%s_UP", link_id);
if (link.policy == SURF_LINK_FULLDUPLEX) {
char *tmp_link = bprintf("%s_UP", link_id);
info.link_down = info.link_up;
}
xbt_dynar_set(p_linkUpDownList, position, &info);
xbt_free(link_id);
}
info.link_down = info.link_up;
}
xbt_dynar_set(p_linkUpDownList, position, &info);
xbt_free(link_id);
}