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
Simplify the code taking Cpu::m_speedPeak changes into account
[simgrid.git]
/
src
/
surf
/
surf_routing_cluster_fat_tree.cpp
diff --git
a/src/surf/surf_routing_cluster_fat_tree.cpp
b/src/surf/surf_routing_cluster_fat_tree.cpp
index
6527e15
..
83ca962
100644
(file)
--- a/
src/surf/surf_routing_cluster_fat_tree.cpp
+++ b/
src/surf/surf_routing_cluster_fat_tree.cpp
@@
-1,3
+1,11
@@
+#include <cstdlib>
+
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+#include <iostream>
+
#include "surf_routing_cluster_fat_tree.hpp"
#include "xbt/lib.h"
#include "surf_routing_cluster_fat_tree.hpp"
#include "xbt/lib.h"
@@
-11,9
+19,12
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_fat_tree, surf, "Routing for fat tree
AS_t model_fat_tree_cluster_create(void)
{
AS_t model_fat_tree_cluster_create(void)
{
- return new AsClusterFatTree();
+ return new
simgrid::surf::
AsClusterFatTree();
}
}
+namespace simgrid {
+namespace surf {
+
AsClusterFatTree::AsClusterFatTree() : levels(0) {
XBT_DEBUG("Creating a new fat tree.");
}
AsClusterFatTree::AsClusterFatTree() : levels(0) {
XBT_DEBUG("Creating a new fat tree.");
}
@@
-47,8
+58,8
@@
bool AsClusterFatTree::isInSubTree(FatTreeNode *root, FatTreeNode *node) {
return true;
}
return true;
}
-void AsClusterFatTree::getRouteAndLatency(
RoutingEdge
*src,
-
RoutingEdge
*dst,
+void AsClusterFatTree::getRouteAndLatency(
NetCard
*src,
+
NetCard
*dst,
sg_platf_route_cbarg_t into,
double *latency) {
FatTreeNode *source, *destination, *currentNode;
sg_platf_route_cbarg_t into,
double *latency) {
FatTreeNode *source, *destination, *currentNode;
@@
-407,8
+418,8
@@
void AsClusterFatTree::addLink(FatTreeNode *parent, unsigned int parentPort,
void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t
cluster) {
void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t
cluster) {
- std::vector<string> parameters;
- std::vector<string> tmp;
+ std::vector<st
d::st
ring> parameters;
+ std::vector<st
d::st
ring> tmp;
boost::split(parameters, cluster->topo_parameters, boost::is_any_of(";"));
boost::split(parameters, cluster->topo_parameters, boost::is_any_of(";"));
@@
-455,12
+466,12
@@
void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t
}
}
-void AsClusterFatTree::generateDotFile(const string& filename) const {
- ofstream file;
+void AsClusterFatTree::generateDotFile(const st
d::st
ring& filename) const {
+
std::
ofstream file;
/* Maybe should we get directly a char*, as open takes strings only beginning
* with C++11...
*/
/* Maybe should we get directly a char*, as open takes strings only beginning
* with C++11...
*/
- file.open(filename.c_str(),
ios::out |
ios::trunc);
+ file.open(filename.c_str(),
std::ios::out | std::
ios::trunc);
if(file.is_open()) {
file << "graph AsClusterFatTree {\n";
if(file.is_open()) {
file << "graph AsClusterFatTree {\n";
@@
-549,3
+560,6
@@
FatTreeLink::FatTreeLink(sg_platf_cluster_cbarg_t cluster,
uniqueId++;
free((void*)linkTemplate.id);
}
uniqueId++;
free((void*)linkTemplate.id);
}
+
+}
+}