this->nodes.push_back(new FatTreeNode(id[i]));
}
}
void AsClusterFatTree::addLink(FatTreeNode *parent, FatTreeNode *child) {
using std::make_pair;
this->nodes.push_back(new FatTreeNode(id[i]));
}
}
void AsClusterFatTree::addLink(FatTreeNode *parent, FatTreeNode *child) {
using std::make_pair;
- if ((int)parent->children.size() == this->nodesByLevel[parent->level] ||
- (int)child->parents.size() == this->nodesByLevel[child->level]) {
+ if (parent->children.size() == this->nodesByLevel[parent->level] ||
+ child->parents.size() == this->nodesByLevel[child->level]) {
/* NB : This case should never happen, if this private function is not misused,
* so should we keep this test, keep it only for debug, throw an exception
* or get rid of it ? In all cases, anytime we get in there, code should be
/* NB : This case should never happen, if this private function is not misused,
* so should we keep this test, keep it only for debug, throw an exception
* or get rid of it ? In all cases, anytime we get in there, code should be
// Then, a l-sized vector standing for the childs number by level
boost::split(tmp, parameters[1], boost::is_any_of(","));
// Then, a l-sized vector standing for the childs number by level
boost::split(tmp, parameters[1], boost::is_any_of(","));
surf_parse_error("Fat trees are defined by the levels number and 3 vectors"
", see the documentation for more informations");
}
surf_parse_error("Fat trees are defined by the levels number and 3 vectors"
", see the documentation for more informations");
}
// Then, a l-sized vector standing for the parents number by level
boost::split(tmp, parameters[2], boost::is_any_of(","));
// Then, a l-sized vector standing for the parents number by level
boost::split(tmp, parameters[2], boost::is_any_of(","));
surf_parse_error("Fat trees are defined by the levels number and 3 vectors"
", see the documentation for more informations");
}
surf_parse_error("Fat trees are defined by the levels number and 3 vectors"
", see the documentation for more informations");
}
// Finally, a l-sized vector standing for the ports number with the lower level
boost::split(tmp, parameters[3], boost::is_any_of(","));
// Finally, a l-sized vector standing for the ports number with the lower level
boost::split(tmp, parameters[3], boost::is_any_of(","));
surf_parse_error("Fat trees are defined by the levels number and 3 vectors"
", see the documentation for more informations");
surf_parse_error("Fat trees are defined by the levels number and 3 vectors"
", see the documentation for more informations");