if(std::string(attr[i]) == "name")name(attr[i+1]);
if(std::string(attr[i]) == "state")this->state(attr[i+1]);
if(std::string(attr[i]) == "nbranch")nbranch(atoi(attr[i+1]));
- if(std::string(attr[i]) == "weight")weight(atof(attr[i+1]));
+ if(std::string(attr[i]) == "loopWeight")weight(atof(attr[i+1]));
if(std::string(attr[i]) == "type")datatype(attr[i+1]);
}
postAttr();
virtual void pre ()
{
_nbranch=0;
- _weight=1;
+ _weight=-1.;
this->looptypeParser<T>::pre();
}
virtual void name (const std::string& name)
this->_cnode=theRuntime->createForEachLoop(_name,currentProc->typeMap[_datatype]);
//set number of branches
if(_nbranch > 0)this->_cnode->edGetNbOfBranchesPort()->edInit(_nbranch);
- this->_cnode->setWeight(_weight);
+ if(_weight > 0)this->_cnode->setWeight(_weight);
this->_cnodes.push_back(this->_cnode);
currentProc->names.push_back(_fullname + '.');
}
if(std::string(attr[i]) == "name")name(attr[i+1]);
if(std::string(attr[i]) == "state")this->state(attr[i+1]);
if(std::string(attr[i]) == "nbranch")nbranch(atoi(attr[i+1]));
- if(std::string(attr[i]) == "weight")weight(atof(attr[i+1]));
+ if(std::string(attr[i]) == "loopWeight")weight(atof(attr[i+1]));
if(std::string(attr[i]) == "lib")lib(attr[i+1]);
if(std::string(attr[i]) == "entry")entry(attr[i+1]);
if(std::string(attr[i]) == "kind")kind(attr[i+1]);
virtual void pre ()
{
_nbranch=0;
- _weight=1;
+ _weight=-1.;
this->looptypeParser<T>::pre();
}
virtual void name (const std::string& name)
this->_cnode=theRuntime->createOptimizerLoop(_name,_lib,_entry,true,_kind, currentProc);
//set number of branches
if(_nbranch > 0)this->_cnode->edGetNbOfBranchesPort()->edInit(_nbranch);
- this->_cnode->setWeight(_weight);
+ if(_weight > 0)this->_cnode->setWeight(_weight);
this->_cnodes.push_back(this->_cnode);
currentProc->names.push_back(_fullname + '.');
}