-
-
-
-
namespace simgrid {
-namespace surf {
+namespace routing {
AsClusterDragonfly::AsClusterDragonfly(const char*name)
: AsCluster(name) {
AsClusterDragonfly::~AsClusterDragonfly() {
- if(this->routers_!=NULL){
- int i;
+ if(this->routers_!=nullptr){
+ unsigned int i;
for (i=0; i<this->numGroups_*this->numChassisPerGroup_*this->numBladesPerChassis_;i++)
delete(routers_[i]);
xbt_free(routers_);
}
DragonflyRouter::~DragonflyRouter(){
- if(this->myNodes_!=NULL)
+ if(this->myNodes_!=nullptr)
xbt_free(myNodes_);
- if(this->greenLinks_!=NULL)
+ if(this->greenLinks_!=nullptr)
xbt_free(greenLinks_);
- if(this->blackLinks_!=NULL)
+ if(this->blackLinks_!=nullptr)
xbt_free(blackLinks_);
- if(this->blueLinks_!=NULL)
+ if(this->blueLinks_!=nullptr)
xbt_free(blueLinks_);
}
void AsClusterDragonfly::createLink(char* id, int numlinks, Link** linkup, Link** linkdown){
- *linkup=NULL;
- *linkdown=NULL;
+ *linkup=nullptr;
+ *linkdown=nullptr;
s_sg_platf_link_cbarg_t linkTemplate;
memset(&linkTemplate, 0, sizeof(linkTemplate));
linkTemplate.bandwidth = this->cluster_->bw * numlinks;
void AsClusterDragonfly::generateLinks() {
- unsigned int i, j, k, l,m;
+ unsigned int i, j, k, l;
static int uniqueId = 0;
- char* id = NULL;
+ char* id = nullptr;
Link* linkup, *linkdown;
- int numRouters = this->numGroups_*this->numChassisPerGroup_*this->numBladesPerChassis_;
+ unsigned int numRouters = this->numGroups_*this->numChassisPerGroup_*this->numBladesPerChassis_;
if (this->cluster_->sharing_policy == SURF_LINK_FULLDUPLEX)
numLinksperLink_=2;