this->accept(&vis);
for(std::list<ForEachLoop *>::const_iterator it=vis._fes.begin();it!=vis._fes.end();it++)
(*it)->edGetNbOfBranchesPort()->edInit(1);
+ if (this->getMaxLevelOfParallelism() > pg->getNumberOfCoresAvailable())
+ throw YACS::Exception("Bloc::fitToPlayGround : Not enough cores available to run the calculation !");
this->removeRecursivelyRedundantCL();
this->partitionRegardingDPL(pd,zeMap);
this->accept(&vis);
ComplexWeight& addWeight(const ComplexWeight *other);
protected:
bool _bootWeight;
- // _loopWeight: vect<pair(weight,nbcorePerIteration)>, for first element of vector: nbcorePerIteration<0 -> unset, nbcorePerIteration==0 -> no loopweight
+ // _loopWeight: vect<pair(weight,nbcorePerIteration)>, for first element of vector: nbcorePerIteration<0 -> unset, nbcorePerIteration==0 -> no loopweight (means no loop inside)
std::vector<std::pair<double,int> > _loopWeight;
double _elementaryWeight;
private:
}
else if (!(*it).first->hasValidLoopWeight())
{
- nbOfCoresAllocated[i]=(int)((double)totalSpace/(double)(sz)); // branch with undefined weight
+ nbOfCoresAllocated[i]=std::max((int)((double)totalSpace/(double)(sz)), nbCoresPerShot[i]); // branch with undefined weight, takes his part proportionnally to the number of branchs
}
else
{