From: Martin Quinson Date: Mon, 14 Nov 2011 15:42:43 +0000 (+0100) Subject: tiny cleanups, and add a FIXME X-Git-Tag: exp_20120216~291 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e706356251849dd3b28d2a78355fc0493cfdb4eb tiny cleanups, and add a FIXME --- diff --git a/src/surf/surf_private.h b/src/surf/surf_private.h index f8a74470c4..d911f0af46 100644 --- a/src/surf/surf_private.h +++ b/src/surf/surf_private.h @@ -132,8 +132,7 @@ typedef struct s_as { struct s_as *routing_father; xbt_dict_t routing_sons; - route_t(*get_route) (AS_t as, - const char *src, const char *dst); + route_t(*get_route) (AS_t as, const char *src, const char *dst); double(*get_latency) (AS_t as, const char *src, const char *dst, route_t e_route); diff --git a/src/surf/surf_routing_vivaldi.c b/src/surf/surf_routing_vivaldi.c index bffcb4f89a..014c412922 100644 --- a/src/surf/surf_routing_vivaldi.c +++ b/src/surf/surf_routing_vivaldi.c @@ -26,6 +26,7 @@ static double euclidean_dist_comp(int index, xbt_dynar_t src, xbt_dynar_t dst) { double src_coord, dst_coord; + // FIXME converting from string to float each time we need a coordinate is ... suboptimal src_coord = atof(xbt_dynar_get_as(src, index, char *)); dst_coord = atof(xbt_dynar_get_as(dst, index, char *)); @@ -54,7 +55,7 @@ static double base_vivaldi_get_latency (const char *src, const char *dst) return euclidean_dist / 1000; } -static double vivaldi_get_link_latency (AS_t rc,const char *src, const char *dst, route_t e_route) +static double vivaldi_get_latency (AS_t rc,const char *src, const char *dst, route_t e_route) { if(routing_get_network_element_type(src) == SURF_NETWORK_ELEMENT_AS) { int need_to_clean = e_route?0:1; @@ -73,6 +74,6 @@ AS_t model_vivaldi_create(void) { AS_t new_component = model_rulebased_create(); new_component->get_route = vivaldi_get_route; - new_component->get_latency = vivaldi_get_link_latency; + new_component->get_latency = vivaldi_get_latency; return new_component; }