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
cleanup in the Link field names
[simgrid.git]
/
src
/
kernel
/
routing
/
AsClusterTorus.cpp
diff --git
a/src/kernel/routing/AsClusterTorus.cpp
b/src/kernel/routing/AsClusterTorus.cpp
index
55a4606
..
3aaa111
100644
(file)
--- a/
src/kernel/routing/AsClusterTorus.cpp
+++ b/
src/kernel/routing/AsClusterTorus.cpp
@@
-27,8
+27,8
@@
inline unsigned int *rankId_to_coords(int rankId, xbt_dynar_t dimensions)
namespace simgrid {
namespace kernel {
namespace routing {
namespace simgrid {
namespace kernel {
namespace routing {
-
AsClusterTorus::AsClusterTorus(const char*
name)
-
: AsCluster(name)
{
+
AsClusterTorus::AsClusterTorus(As* father, const char* name) : AsCluster(father,
name)
+ {
}
AsClusterTorus::~AsClusterTorus() {
xbt_dynar_free(&dimensions_);
}
AsClusterTorus::~AsClusterTorus() {
xbt_dynar_free(&dimensions_);
@@
-78,7
+78,7
@@
namespace simgrid {
* note that position rankId*(xbt_dynar_length(dimensions)+has_loopack?+has_limiter?)
* holds the link "rankId->rankId"
*/
* note that position rankId*(xbt_dynar_length(dimensions)+has_loopack?+has_limiter?)
* holds the link "rankId->rankId"
*/
-
xbt_dynar_set(privateLinks_, position + j, &info
);
+
privateLinks_.insert({position + j, info}
);
dim_product *= current_dimension;
xbt_free(link_id);
}
dim_product *= current_dimension;
xbt_free(link_id);
}
@@
-118,11
+118,11
@@
namespace simgrid {
return;
if ((src->id() == dst->id()) && hasLoopback_) {
return;
if ((src->id() == dst->id()) && hasLoopback_) {
- s_surf_parsing_link_up_down_t info =
xbt_dynar_get_as(privateLinks_, src->id() * linkCountPerNode_, s_surf_parsing_link_up_down_t
);
+ s_surf_parsing_link_up_down_t info =
privateLinks_.at(src->id() * linkCountPerNode_
);
route->link_list->push_back(info.linkUp);
if (lat)
route->link_list->push_back(info.linkUp);
if (lat)
- *lat += info.linkUp->
getL
atency();
+ *lat += info.linkUp->
l
atency();
return;
}
return;
}
@@
-132,8
+132,8
@@
namespace simgrid {
* TODO Change to dynamic assignment
*/
unsigned int j, cur_dim, dim_product = 1;
* TODO Change to dynamic assignment
*/
unsigned int j, cur_dim, dim_product = 1;
- int current_node = src->id();
-
int unsigned
next_node = 0;
+
unsigned
int current_node = src->id();
+
unsigned int
next_node = 0;
/*
* Arrays that hold the coordinates of the current node and
* the target; comparing the values at the i-th position of
/*
* Arrays that hold the coordinates of the current node and
* the target; comparing the values at the i-th position of
@@
-200,20
+200,20
@@
namespace simgrid {
s_surf_parsing_link_up_down_t info;
if (hasLimiter_) { // limiter for sender
s_surf_parsing_link_up_down_t info;
if (hasLimiter_) { // limiter for sender
- info =
xbt_dynar_get_as(privateLinks_, nodeOffset + hasLoopback_, s_surf_parsing_link_up_down_t
);
+ info =
privateLinks_.at(nodeOffset + hasLoopback_
);
route->link_list->push_back(info.linkUp);
}
route->link_list->push_back(info.linkUp);
}
- info =
xbt_dynar_get_as(privateLinks_, linkOffset, s_surf_parsing_link_up_down_
t);
+ info =
privateLinks_.at(linkOffse
t);
if (use_lnk_up == false) {
route->link_list->push_back(info.linkDown);
if (lat)
if (use_lnk_up == false) {
route->link_list->push_back(info.linkDown);
if (lat)
- *lat += info.linkDown->
getL
atency();
+ *lat += info.linkDown->
l
atency();
} else {
route->link_list->push_back(info.linkUp);
if (lat)
} else {
route->link_list->push_back(info.linkUp);
if (lat)
- *lat += info.linkUp->
getL
atency();
+ *lat += info.linkUp->
l
atency();
}
current_node = next_node;
next_node = 0;
}
current_node = next_node;
next_node = 0;