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
snake_case the s4u::NetZone signals
[simgrid.git]
/
src
/
kernel
/
routing
/
RoutedZone.cpp
diff --git
a/src/kernel/routing/RoutedZone.cpp
b/src/kernel/routing/RoutedZone.cpp
index
73df03a
..
f6585e6
100644
(file)
--- a/
src/kernel/routing/RoutedZone.cpp
+++ b/
src/kernel/routing/RoutedZone.cpp
@@
-63,8
+63,8
@@
RoutedZone::RoutedZone(NetZone* father, std::string name) : NetZoneImpl(father,
{
}
-void RoutedZone::get
G
raph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
- std::map<std::string, xbt_edge_t>* edges)
+void RoutedZone::get
_g
raph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
+
std::map<std::string, xbt_edge_t>* edges)
{
std::vector<kernel::routing::NetPoint*> vertices = getVertices();
@@
-75,9
+75,9
@@
void RoutedZone::getGraph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
RouteCreationArgs* route = new RouteCreationArgs();
- get
LocalR
oute(my_src, my_dst, route, nullptr);
+ get
_local_r
oute(my_src, my_dst, route, nullptr);
- XBT_DEBUG("get_route_and_latency %s -> %s", my_src->get
Cname(), my_dst->getC
name());
+ XBT_DEBUG("get_route_and_latency %s -> %s", my_src->get
_cname(), my_dst->get_c
name());
xbt_node_t current;
xbt_node_t previous;
@@
-85,15
+85,15
@@
void RoutedZone::getGraph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
const char *current_name;
if (route->gw_src) {
- previous = new_xbt_graph_node(graph, route->gw_src->get
C
name(), nodes);
- previous_name = route->gw_src->get
C
name();
+ previous = new_xbt_graph_node(graph, route->gw_src->get
_c
name(), nodes);
+ previous_name = route->gw_src->get
_c
name();
} else {
- previous = new_xbt_graph_node(graph, my_src->get
C
name(), nodes);
- previous_name = my_src->get
C
name();
+ previous = new_xbt_graph_node(graph, my_src->get
_c
name(), nodes);
+ previous_name = my_src->get
_c
name();
}
for (auto const& link : route->link_list) {
- const char* link_name = link->get
C
name();
+ const char* link_name = link->get
_c
name();
current = new_xbt_graph_node(graph, link_name, nodes);
current_name = link_name;
new_xbt_graph_edge(graph, previous, current, edges);
@@
-103,11
+103,11
@@
void RoutedZone::getGraph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
}
if (route->gw_dst) {
- current = new_xbt_graph_node(graph, route->gw_dst->get
C
name(), nodes);
- current_name = route->gw_dst->get
C
name();
+ current = new_xbt_graph_node(graph, route->gw_dst->get
_c
name(), nodes);
+ current_name = route->gw_dst->get
_c
name();
} else {
- current = new_xbt_graph_node(graph, my_dst->get
C
name(), nodes);
- current_name = my_dst->get
C
name();
+ current = new_xbt_graph_node(graph, my_dst->get
_c
name(), nodes);
+ current_name = my_dst->get
_c
name();
}
new_xbt_graph_edge(graph, previous, current, edges);
XBT_DEBUG(" %s -> %s", previous_name, current_name);
@@
-121,7
+121,7
@@
void RoutedZone::getGraph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
/* ************************* GENERIC AUX FUNCTIONS ************************** */
/* change a route containing link names into a route containing link entities */
RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
- NetPoint* gw_dst, std::vector<
simgrid::surf
::LinkImpl*>& link_list,
+ NetPoint* gw_dst, std::vector<
resource
::LinkImpl*>& link_list,
bool symmetrical, bool change_order)
{
RouteCreationArgs* result = new RouteCreationArgs();
@@
-149,59
+149,59
@@
RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint*
void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
{
- xbt_assert(src, "Cannot find a route from nullptr to %s", dst->get
C
name());
- xbt_assert(dst, "Cannot find a route from %s to nullptr", src->get
C
name());
+ xbt_assert(src, "Cannot find a route from nullptr to %s", dst->get
_c
name());
+ xbt_assert(dst, "Cannot find a route from %s to nullptr", src->get
_c
name());
- NetZone* src_as = src->
net
zone();
- NetZone* dst_as = dst->
net
zone();
+ NetZone* src_as = src->
get_englobing_
zone();
+ NetZone* dst_as = dst->
get_englobing_
zone();
xbt_assert(src_as == dst_as,
"Internal error: %s@%s and %s@%s are not in the same netzone as expected. Please report that bug.",
- src->get
Cname(), src_as->getCname(), dst->getCname(), dst_as->getC
name());
+ src->get
_cname(), src_as->get_cname(), dst->get_cname(), dst_as->get_c
name());
- xbt_assert(this == dst_as, "Internal error: route destination %s@%s is not in netzone %s as expected (route source: "
- "%s@%s). Please report that bug.",
- src->getCname(), dst->getCname(), src_as->getCname(), dst_as->getCname(), getCname());
+ xbt_assert(this == dst_as,
+ "Internal error: route destination %s@%s is not in netzone %s as expected (route source: "
+ "%s@%s). Please report that bug.",
+ src->get_cname(), dst->get_cname(), src_as->get_cname(), dst_as->get_cname(), get_cname());
}
-void RoutedZone::addRouteCheckParams(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
- kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
- std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+void RoutedZone::addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+ std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
- const char* srcName = src->get
C
name();
- const char* dstName = dst->get
C
name();
+ const char* srcName = src->get
_c
name();
+ const char* dstName = dst->get
_c
name();
if (not gw_dst || not gw_src) {
XBT_DEBUG("Load Route from \"%s\" to \"%s\"", srcName, dstName);
xbt_assert(src, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, srcName);
xbt_assert(dst, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, dstName);
xbt_assert(not link_list.empty(), "Empty route (between %s and %s) forbidden.", srcName, dstName);
- xbt_assert(not src->is
NetZ
one(),
+ xbt_assert(not src->is
_netz
one(),
"When defining a route, src cannot be a netzone such as '%s'. Did you meant to have an NetzoneRoute?",
srcName);
- xbt_assert(not dst->is
NetZ
one(),
+ xbt_assert(not dst->is
_netz
one(),
"When defining a route, dst cannot be a netzone such as '%s'. Did you meant to have an NetzoneRoute?",
dstName);
} else {
- XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, gw_src->get
Cname(), dstName, gw_dst->getC
name());
- xbt_assert(src->is
NetZ
one(), "When defining a NetzoneRoute, src must be a netzone but '%s' is not", srcName);
- xbt_assert(dst->is
NetZ
one(), "When defining a NetzoneRoute, dst must be a netzone but '%s' is not", dstName);
+ XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, gw_src->get
_cname(), dstName, gw_dst->get_c
name());
+ xbt_assert(src->is
_netz
one(), "When defining a NetzoneRoute, src must be a netzone but '%s' is not", srcName);
+ xbt_assert(dst->is
_netz
one(), "When defining a NetzoneRoute, dst must be a netzone but '%s' is not", dstName);
- xbt_assert(gw_src->is
Host() || gw_src->isR
outer(),
+ xbt_assert(gw_src->is
_host() || gw_src->is_r
outer(),
"When defining a NetzoneRoute, gw_src must be an host or a router but '%s' is not.", srcName);
- xbt_assert(gw_dst->is
Host() || gw_dst->isR
outer(),
+ xbt_assert(gw_dst->is
_host() || gw_dst->is_r
outer(),
"When defining a NetzoneRoute, gw_dst must be an host or a router but '%s' is not.", dstName);
- xbt_assert(gw_src != gw_dst, "Cannot define an NetzoneRoute from '%s' to itself", gw_src->get
C
name());
+ xbt_assert(gw_src != gw_dst, "Cannot define an NetzoneRoute from '%s' to itself", gw_src->get
_c
name());
- xbt_assert(src, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, gw_src->get
C
name(), dstName,
- gw_dst->get
C
name(), srcName);
- xbt_assert(dst, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, gw_src->get
C
name(), dstName,
- gw_dst->get
C
name(), dstName);
- xbt_assert(not link_list.empty(), "Empty route (between %s@%s and %s@%s) forbidden.", srcName, gw_src->get
C
name(),
- dstName, gw_dst->get
C
name());
+ xbt_assert(src, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, gw_src->get
_c
name(), dstName,
+ gw_dst->get
_c
name(), srcName);
+ xbt_assert(dst, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, gw_src->get
_c
name(), dstName,
+ gw_dst->get
_c
name(), dstName);
+ xbt_assert(not link_list.empty(), "Empty route (between %s@%s and %s@%s) forbidden.", srcName, gw_src->get
_c
name(),
+ dstName, gw_dst->get
_c
name());
}
- on
RouteC
reation(symmetrical, src, dst, gw_src, gw_dst, link_list);
+ on
_route_c
reation(symmetrical, src, dst, gw_src, gw_dst, link_list);
}
}
}