A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename routing_component to as, since that's just an AS at the end of the day
[simgrid.git]
/
src
/
surf
/
surf_routing.c
diff --git
a/src/surf/surf_routing.c
b/src/surf/surf_routing.c
index
434ddf1
..
f7bd97d
100644
(file)
--- a/
src/surf/surf_routing.c
+++ b/
src/surf/surf_routing.c
@@
-37,7
+37,7
@@
static xbt_dict_t random_value = NULL;
/* Global vars */
routing_global_t global_routing = NULL;
/* Global vars */
routing_global_t global_routing = NULL;
-
routing_component
_t current_routing = NULL;
+
AS
_t current_routing = NULL;
routing_model_description_t current_routing_model = NULL;
/* global parse functions */
routing_model_description_t current_routing_model = NULL;
/* global parse functions */
@@
-294,7
+294,7
@@
static void routing_parse_E_bypassRoute(void)
*/
void routing_AS_begin(const char *AS_id, const char *wanted_routing_type)
{
*/
void routing_AS_begin(const char *AS_id, const char *wanted_routing_type)
{
-
routing_component
_t new_routing;
+
AS
_t new_routing;
routing_model_description_t model = NULL;
int cpt;
routing_model_description_t model = NULL;
int cpt;
@@
-313,7
+313,7
@@
void routing_AS_begin(const char *AS_id, const char *wanted_routing_type)
}
/* make a new routing component */
}
/* make a new routing component */
- new_routing = (
routing_component
_t) (*(model->create)) ();
+ new_routing = (
AS
_t) (*(model->create)) ();
new_routing->routing = model;
new_routing->hierarchy = SURF_ROUTING_NULL;
new_routing->name = xbt_strdup(AS_id);
new_routing->routing = model;
new_routing->hierarchy = SURF_ROUTING_NULL;
new_routing->name = xbt_strdup(AS_id);
@@
-392,21
+392,21
@@
void routing_AS_end()
* father in the chain
*/
static void elements_father(const char *src, const char *dst,
* father in the chain
*/
static void elements_father(const char *src, const char *dst,
-
routing_component
_t * res_father,
-
routing_component
_t * res_src,
-
routing_component
_t * res_dst)
+
AS
_t * res_father,
+
AS
_t * res_src,
+
AS
_t * res_dst)
{
xbt_assert(src && dst, "bad parameters for \"elements_father\" method");
#define ELEMENTS_FATHER_MAXDEPTH 16 /* increase if it is not enough */
{
xbt_assert(src && dst, "bad parameters for \"elements_father\" method");
#define ELEMENTS_FATHER_MAXDEPTH 16 /* increase if it is not enough */
-
routing_component
_t src_as, dst_as;
-
routing_component
_t path_src[ELEMENTS_FATHER_MAXDEPTH];
-
routing_component
_t path_dst[ELEMENTS_FATHER_MAXDEPTH];
+
AS
_t src_as, dst_as;
+
AS
_t path_src[ELEMENTS_FATHER_MAXDEPTH];
+
AS
_t path_dst[ELEMENTS_FATHER_MAXDEPTH];
int index_src = 0;
int index_dst = 0;
int index_src = 0;
int index_dst = 0;
-
routing_component
_t current;
-
routing_component
_t current_src;
-
routing_component
_t current_dst;
-
routing_component
_t father;
+
AS
_t current;
+
AS
_t current_src;
+
AS
_t current_dst;
+
AS
_t father;
/* (1) find the as where the src and dst are located */
network_element_info_t src_data = xbt_lib_get_or_null(host_lib, src,
/* (1) find the as where the src and dst are located */
network_element_info_t src_data = xbt_lib_get_or_null(host_lib, src,
@@
-474,9
+474,9
@@
static void _get_route_latency(const char *src, const char *dst,
XBT_DEBUG("Solve route/latency \"%s\" to \"%s\"", src, dst);
xbt_assert(src && dst, "bad parameters for \"_get_route_latency\" method");
XBT_DEBUG("Solve route/latency \"%s\" to \"%s\"", src, dst);
xbt_assert(src && dst, "bad parameters for \"_get_route_latency\" method");
-
routing_component
_t common_father;
-
routing_component
_t src_father;
-
routing_component
_t dst_father;
+
AS
_t common_father;
+
AS
_t src_father;
+
AS
_t dst_father;
elements_father(src, dst, &common_father, &src_father, &dst_father);
if (src_father == dst_father) { /* SURF_ROUTING_BASE */
elements_father(src, dst, &common_father, &src_father, &dst_father);
if (src_father == dst_father) { /* SURF_ROUTING_BASE */
@@
-677,12
+677,12
@@
static double get_latency(const char *src, const char *dst)
* This fuction is call by "finalize". It allow to finalize the
* AS or routing components. It delete all the structures.
*/
* This fuction is call by "finalize". It allow to finalize the
* AS or routing components. It delete all the structures.
*/
-static void _finalize(
routing_component
_t rc)
+static void _finalize(
AS
_t rc)
{
if (rc) {
xbt_dict_cursor_t cursor = NULL;
char *key;
{
if (rc) {
xbt_dict_cursor_t cursor = NULL;
char *key;
-
routing_component
_t elem;
+
AS
_t elem;
xbt_dict_foreach(rc->routing_sons, cursor, key, elem) {
_finalize(elem);
}
xbt_dict_foreach(rc->routing_sons, cursor, key, elem) {
_finalize(elem);
}
@@
-712,7
+712,7
@@
static void finalize(void)
xbt_free(global_routing);
}
xbt_free(global_routing);
}
-static xbt_dynar_t recursive_get_onelink_routes(
routing_component
_t rc)
+static xbt_dynar_t recursive_get_onelink_routes(
AS
_t rc)
{
xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
{
xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
@@
-728,7
+728,7
@@
static xbt_dynar_t recursive_get_onelink_routes(routing_component_t rc)
//recursing
char *key;
xbt_dict_cursor_t cursor = NULL;
//recursing
char *key;
xbt_dict_cursor_t cursor = NULL;
-
routing_component
_t rc_child;
+
AS
_t rc_child;
xbt_dict_foreach(rc->routing_sons, cursor, key, rc_child) {
xbt_dynar_t onelink_child = recursive_get_onelink_routes(rc_child);
if (onelink_child) {
xbt_dict_foreach(rc->routing_sons, cursor, key, rc_child) {
xbt_dynar_t onelink_child = recursive_get_onelink_routes(rc_child);
if (onelink_child) {