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
Remove superfluous indirection.
[simgrid.git]
/
src
/
kernel
/
routing
/
DragonflyZone.cpp
diff --git
a/src/kernel/routing/DragonflyZone.cpp
b/src/kernel/routing/DragonflyZone.cpp
index
dbb52a3
..
9e23f69
100644
(file)
--- a/
src/kernel/routing/DragonflyZone.cpp
+++ b/
src/kernel/routing/DragonflyZone.cpp
@@
-31,15
+31,15
@@
DragonflyZone::~DragonflyZone()
}
}
}
}
-void DragonflyZone::rankId_to_coords(int rankId, unsigned int
(*coords)
[4])
+void DragonflyZone::rankId_to_coords(int rankId, unsigned int
coords
[4])
{
// coords : group, chassis, blade, node
{
// coords : group, chassis, blade, node
-
(*coords)
[0] = rankId / (num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_);
- rankId
= rankId % (num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_);
-
(*coords)
[1] = rankId / (num_blades_per_chassis_ * num_nodes_per_blade_);
- rankId
= rankId % (num_blades_per_chassis_ * num_nodes_per_blade_);
-
(*coords)
[2] = rankId / num_nodes_per_blade_;
-
(*coords)
[3] = rankId % num_nodes_per_blade_;
+
coords
[0] = rankId / (num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_);
+ rankId = rankId % (num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_);
+
coords
[1] = rankId / (num_blades_per_chassis_ * num_nodes_per_blade_);
+ rankId = rankId % (num_blades_per_chassis_ * num_nodes_per_blade_);
+
coords
[2] = rankId / num_nodes_per_blade_;
+
coords
[3] = rankId % num_nodes_per_blade_;
}
void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
}
void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
@@
-114,7
+114,7
@@
void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
}
this->sharing_policy_ = cluster->sharing_policy;
}
this->sharing_policy_ = cluster->sharing_policy;
- if (cluster->sharing_policy ==
SURF_LINK_
SPLITDUPLEX)
+ if (cluster->sharing_policy ==
s4u::Link::SharingPolicy::
SPLITDUPLEX)
this->num_links_per_link_ = 2;
this->bw_ = cluster->bw;
this->lat_ = cluster->lat;
this->num_links_per_link_ = 2;
this->bw_ = cluster->bw;
this->lat_ = cluster->lat;
@@
-172,7
+172,7
@@
void DragonflyZone::createLink(const std::string& id, int numlinks, resource::Li
sg_platf_new_link(&linkTemplate);
XBT_DEBUG("Generating link %s", id.c_str());
resource::LinkImpl* link;
sg_platf_new_link(&linkTemplate);
XBT_DEBUG("Generating link %s", id.c_str());
resource::LinkImpl* link;
- if (this->sharing_policy_ ==
SURF_LINK_
SPLITDUPLEX) {
+ if (this->sharing_policy_ ==
s4u::Link::SharingPolicy::
SPLITDUPLEX) {
*linkup = resource::LinkImpl::byName(linkTemplate.id + "_UP"); // check link?
*linkdown = resource::LinkImpl::byName(linkTemplate.id + "_DOWN"); // check link ?
} else {
*linkup = resource::LinkImpl::byName(linkTemplate.id + "_UP"); // check link?
*linkdown = resource::LinkImpl::byName(linkTemplate.id + "_DOWN"); // check link ?
} else {
@@
-203,7
+203,7
@@
void DragonflyZone::generateLinks()
this->createLink(id, 1, &linkup, &linkdown);
this->routers_[i]->my_nodes_[j] = linkup;
this->createLink(id, 1, &linkup, &linkdown);
this->routers_[i]->my_nodes_[j] = linkup;
- if (this->sharing_policy_ ==
SURF_LINK_
SPLITDUPLEX)
+ if (this->sharing_policy_ ==
s4u::Link::SharingPolicy::
SPLITDUPLEX)
this->routers_[i]->my_nodes_[j + 1] = linkdown;
uniqueId++;
this->routers_[i]->my_nodes_[j + 1] = linkdown;
uniqueId++;
@@
-285,9
+285,9
@@
void DragonflyZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationA
}
unsigned int myCoords[4];
}
unsigned int myCoords[4];
- rankId_to_coords(src->id(),
&
myCoords);
+ rankId_to_coords(src->id(), myCoords);
unsigned int targetCoords[4];
unsigned int targetCoords[4];
- rankId_to_coords(dst->id(),
&
targetCoords);
+ rankId_to_coords(dst->id(), targetCoords);
XBT_DEBUG("src : %u group, %u chassis, %u blade, %u node", myCoords[0], myCoords[1], myCoords[2], myCoords[3]);
XBT_DEBUG("dst : %u group, %u chassis, %u blade, %u node", targetCoords[0], targetCoords[1], targetCoords[2],
targetCoords[3]);
XBT_DEBUG("src : %u group, %u chassis, %u blade, %u node", myCoords[0], myCoords[1], myCoords[2], myCoords[3]);
XBT_DEBUG("dst : %u group, %u chassis, %u blade, %u node", targetCoords[0], targetCoords[1], targetCoords[2],
targetCoords[3]);