-FatTreeZone::FatTreeZone(NetZone* father, std::string name) : ClusterZone(father, name)
+FatTreeZone::FatTreeZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel)
+ : ClusterZone(father, name, netmodel)
{
XBT_DEBUG("Is %d(%u,%u) in the sub tree of %d(%u,%u) ?", node->id, node->level, node->position, root->id, root->level,
root->position);
{
XBT_DEBUG("Is %d(%u,%u) in the sub tree of %d(%u,%u) ?", node->id, node->level, node->position, root->id, root->level,
root->position);
int d = destination->position; // as in d-mod-k
for (unsigned int i = 0; i < currentNode->level; i++)
int d = destination->position; // as in d-mod-k
for (unsigned int i = 0; i < currentNode->level; i++)
if (XBT_LOG_ISENABLED(surf_route_fat_tree, xbt_log_priority_debug)) {
std::stringstream msgBuffer;
if (XBT_LOG_ISENABLED(surf_route_fat_tree, xbt_log_priority_debug)) {
std::stringstream msgBuffer;
unsigned int k = 0;
// Nodes are totally ordered, by level and then by position, in this->nodes
for (unsigned int i = 0; i < this->levels_; i++) {
for (unsigned int j = 0; j < this->nodes_by_level_[i]; j++) {
unsigned int k = 0;
// Nodes are totally ordered, by level and then by position, in this->nodes
for (unsigned int i = 0; i < this->levels_; i++) {
for (unsigned int j = 0; j < this->nodes_by_level_[i]; j++) {
{
std::vector<FatTreeNode*>::iterator currentParentNode = this->nodes_.begin();
int connectionsNumber = 0;
const int level = node->level;
XBT_DEBUG("We are connecting node %d(%u,%u) to his parents.", node->id, node->level, node->position);
{
std::vector<FatTreeNode*>::iterator currentParentNode = this->nodes_.begin();
int connectionsNumber = 0;
const int level = node->level;
XBT_DEBUG("We are connecting node %d(%u,%u) to his parents.", node->id, node->level, node->position);
XBT_DEBUG("%d(%u,%u) and %d(%u,%u) are related,"
" with %u links between them.",
node->id, node->level, node->position, (*currentParentNode)->id, (*currentParentNode)->level,
XBT_DEBUG("%d(%u,%u) and %d(%u,%u) are related,"
" with %u links between them.",
node->id, node->level, node->position, (*currentParentNode)->id, (*currentParentNode)->level,
{
XBT_DEBUG("Generating switches.");
this->nodes_by_level_.resize(this->levels_ + 1, 0);
{
XBT_DEBUG("Generating switches.");
this->nodes_by_level_.resize(this->levels_ + 1, 0);