ZoneCreationArgs zone;
zone.id = cluster->id;
switch (cluster->topology) {
- case SURF_CLUSTER_TORUS:
- zone.routing = A_surfxml_AS_routing_ClusterTorus;
- break;
- case SURF_CLUSTER_DRAGONFLY:
- zone.routing = A_surfxml_AS_routing_ClusterDragonfly;
- break;
- case SURF_CLUSTER_FAT_TREE:
- zone.routing = A_surfxml_AS_routing_ClusterFatTree;
- break;
- default:
- zone.routing = A_surfxml_AS_routing_Cluster;
- break;
+ case ClusterTopology::TORUS:
+ zone.routing = A_surfxml_AS_routing_ClusterTorus;
+ break;
+ case ClusterTopology::DRAGONFLY:
+ zone.routing = A_surfxml_AS_routing_ClusterDragonfly;
+ break;
+ case ClusterTopology::FAT_TREE:
+ zone.routing = A_surfxml_AS_routing_ClusterFatTree;
+ break;
+ default:
+ zone.routing = A_surfxml_AS_routing_Cluster;
+ break;
}
sg_platf_new_Zone_begin(&zone);
simgrid::kernel::routing::ClusterZone* current_as = static_cast<ClusterZone*>(routing_get_current());
}
//call the cluster function that adds the others links
- if (cluster->topology == SURF_CLUSTER_FAT_TREE) {
+ if (cluster->topology == ClusterTopology::FAT_TREE) {
static_cast<FatTreeZone*>(current_as)->addProcessingNode(i);
} else {
current_as->create_links_for_node(cluster, i, rankId, current_as->nodePositionWithLimiter(rankId));
typedef size_t yy_size_t;
#endif
-enum e_surf_cluster_topology_t {
- SURF_CLUSTER_DRAGONFLY = 3,
- SURF_CLUSTER_FAT_TREE = 2,
- SURF_CLUSTER_FLAT = 1,
- SURF_CLUSTER_TORUS = 0
-};
-
/* ***************************************** */
/*
* Platform creation functions. Instead of passing 123 arguments to the creation functions
std::vector<simgrid::surf::LinkImpl*> link_list;
};
+enum class ClusterTopology { DRAGONFLY = 3, FAT_TREE = 2, FLAT = 1, TORUS = 0 };
+
class ClusterCreationArgs {
public:
std::string id;
double loopback_bw = 0;
double loopback_lat = 0;
double limiter_link = 0;
- e_surf_cluster_topology_t topology;
+ ClusterTopology topology;
std::string topo_parameters;
std::map<std::string, std::string>* properties;
std::string router_id;
switch(AX_surfxml_cluster_topology){
case A_surfxml_cluster_topology_FLAT:
- cluster.topology= SURF_CLUSTER_FLAT ;
+ cluster.topology = ClusterTopology::FLAT;
break;
case A_surfxml_cluster_topology_TORUS:
- cluster.topology= SURF_CLUSTER_TORUS ;
+ cluster.topology = ClusterTopology::TORUS;
break;
case A_surfxml_cluster_topology_FAT___TREE:
- cluster.topology = SURF_CLUSTER_FAT_TREE;
+ cluster.topology = ClusterTopology::FAT_TREE;
break;
case A_surfxml_cluster_topology_DRAGONFLY:
- cluster.topology= SURF_CLUSTER_DRAGONFLY ;
+ cluster.topology = ClusterTopology::DRAGONFLY;
break;
default:
surf_parse_error(std::string("Invalid cluster topology for cluster ") + cluster.id);