Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename some fields (ignorable)
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 29 Feb 2016 11:34:57 +0000 (12:34 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 29 Feb 2016 11:52:55 +0000 (12:52 +0100)
src/include/surf/surf.h
src/instr/jedule/jedule_sd_binding.cpp
src/msg/msg_environment.cpp
src/surf/instr_routing.cpp
src/surf/surf_routing.cpp
src/surf/surf_routing.hpp

index 4605e69..771db26 100644 (file)
@@ -779,7 +779,7 @@ XBT_PUBLIC_DATA(xbt_dict_t) watched_hosts_lib;
 XBT_PUBLIC_DATA(AS_t) surf_AS_get_routing_root(void);
 XBT_PUBLIC_DATA(const char *) surf_AS_get_name(AS_t as);
 XBT_PUBLIC_DATA(AS_t) surf_AS_get_by_name(const char * name);
-XBT_PUBLIC_DATA(xbt_dict_t) surf_AS_get_routing_sons(AS_t as);
+XBT_PUBLIC_DATA(xbt_dict_t) surf_AS_get_children(AS_t as);
 XBT_PUBLIC_DATA(xbt_dynar_t) surf_AS_get_hosts(AS_t as);
 XBT_PUBLIC_DATA(void) surf_AS_get_graph(AS_t as, xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges);
 
index d780d3c..e2a09f4 100644 (file)
@@ -58,7 +58,7 @@ static void create_hierarchy(AS_t current_comp,
   xbt_dict_cursor_t cursor = NULL;
   char *key;
   AS_t elem;
-  xbt_dict_t routing_sons = surf_AS_get_routing_sons(current_comp);
+  xbt_dict_t routing_sons = surf_AS_get_children(current_comp);
 
   if (xbt_dict_is_empty(routing_sons)) {
     // I am no AS
index d070253..067eb5f 100644 (file)
@@ -60,7 +60,7 @@ msg_as_t MSG_environment_as_get_by_name(const char * name) {
 }
 
 xbt_dict_t MSG_environment_as_get_routing_sons(msg_as_t as) {
-  xbt_dict_t res = surf_AS_get_routing_sons(as);
+  xbt_dict_t res = surf_AS_get_children(as);
   return res;
 }
 
index fc53997..d53c5d2 100644 (file)
@@ -130,12 +130,12 @@ static void recursiveGraphExtraction (simgrid::surf::As *rc, container_t contain
     return;
   }
   XBT_DEBUG ("Graph extraction for routing_component = %s", rc->name_);
-  if (!xbt_dict_is_empty(rc->sons_)){
+  if (!xbt_dict_is_empty(rc->children_)){
     xbt_dict_cursor_t cursor = NULL;
     AS_t rc_son;
     char *child_name;
     //bottom-up recursion
-    xbt_dict_foreach(surf_AS_get_routing_sons(rc), cursor, child_name, rc_son) {
+    xbt_dict_foreach(surf_AS_get_children(rc), cursor, child_name, rc_son) {
       container_t child_container = (container_t) xbt_dict_get (
         container->children, surf_AS_get_name(rc_son));
       recursiveGraphExtraction (rc_son, child_container, filter);
@@ -446,12 +446,12 @@ int instr_platform_traced ()
 static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges,
     AS_t rc, container_t container)
 {
-  if (!xbt_dict_is_empty(surf_AS_get_routing_sons(rc))){
+  if (!xbt_dict_is_empty(surf_AS_get_children(rc))){
     xbt_dict_cursor_t cursor = NULL;
     AS_t rc_son;
     char *child_name;
     //bottom-up recursion
-    xbt_dict_foreach(surf_AS_get_routing_sons(rc), cursor, child_name, rc_son) {
+    xbt_dict_foreach(surf_AS_get_children(rc), cursor, child_name, rc_son) {
       container_t child_container = (container_t) xbt_dict_get (
         container->children, surf_AS_get_name(rc_son));
       recursiveXBTGraphExtraction (graph, nodes, edges, rc_son, child_container);
index ad80f33..9b64a4e 100644 (file)
@@ -37,12 +37,12 @@ namespace surf {
     xbt_dict_cursor_t cursor = NULL;
     char *key;
     AS_t elem;
-    xbt_dict_foreach(sons_, cursor, key, elem) {
+    xbt_dict_foreach(children_, cursor, key, elem) {
       delete (As*)elem;
     }
 
 
-    xbt_dict_free(&sons_);
+    xbt_dict_free(&children_);
     xbt_dynar_free(&vertices_);
     xbt_dynar_free(&upDownLinks);
     for (auto &kv : bypassRoutes_)
@@ -336,7 +336,7 @@ void routing_AS_begin(sg_platf_AS_cbarg_t AS)
     netcard->setId(-1);
   } else if (current_routing != NULL && routing_platf->root_ != NULL) {
 
-    xbt_assert(!xbt_dict_get_or_null(current_routing->sons_, AS->id),
+    xbt_assert(!xbt_dict_get_or_null(current_routing->children_, AS->id),
                "The AS \"%s\" already exists", AS->id);
     /* it is a part of the tree */
     new_as->father_ = current_routing;
@@ -344,7 +344,7 @@ void routing_AS_begin(sg_platf_AS_cbarg_t AS)
     if (current_routing->hierarchy_ == SURF_ROUTING_NULL)
       current_routing->hierarchy_ = SURF_ROUTING_RECURSIVE;
     /* add to the sons dictionary */
-    xbt_dict_set(current_routing->sons_, AS->id, (void *) new_as, NULL);
+    xbt_dict_set(current_routing->children_, AS->id, (void *) new_as, NULL);
     /* add to the father element list */
     netcard->setId(current_routing->addComponent(netcard));
   } else {
@@ -534,7 +534,7 @@ static xbt_dynar_t _recursiveGetOneLinkRoutes(As *rc)
   char *key;
   xbt_dict_cursor_t cursor = NULL;
   AS_t rc_child;
-  xbt_dict_foreach(rc->sons_, cursor, key, rc_child) {
+  xbt_dict_foreach(rc->children_, cursor, key, rc_child) {
     xbt_dynar_t onelink_child = _recursiveGetOneLinkRoutes(rc_child);
     if (onelink_child)
       xbt_dynar_merge(&ret,&onelink_child);
@@ -780,7 +780,7 @@ static simgrid::surf::As *surf_AS_recursive_get_by_name(simgrid::surf::As *curre
   if(!strcmp(current->name_, name))
     return current;
 
-  xbt_dict_foreach(current->sons_, cursor, key, elem) {
+  xbt_dict_foreach(current->children_, cursor, key, elem) {
     tmp = surf_AS_recursive_get_by_name(elem, name);
     if(tmp != NULL ) {
         break;
@@ -797,9 +797,9 @@ simgrid::surf::As *surf_AS_get_by_name(const char * name)
   return as;
 }
 
-xbt_dict_t surf_AS_get_routing_sons(simgrid::surf::As *as)
+xbt_dict_t surf_AS_get_children(simgrid::surf::As *as)
 {
-  return as->sons_;
+  return as->children_;
 }
 
 xbt_dynar_t surf_AS_get_hosts(simgrid::surf::As *as)
index dd4ef9d..bd09517 100644 (file)
@@ -68,7 +68,7 @@ public:
   char *name_ = nullptr;
   NetCard *netcard_ = nullptr; // Our representative in the father AS
   As *father_ = nullptr;
-  xbt_dict_t sons_ = xbt_dict_new_homogeneous(NULL); // sub-ASes
+  xbt_dict_t children_ = xbt_dict_new_homogeneous(NULL); // sub-ASes
   xbt_dynar_t vertices_ = xbt_dynar_new(sizeof(char*),NULL); // our content, as known to our graph routing algorithm (maps vertexId -> vertex)
 
 private: