#include <PlayGround.hxx>
Definition at line 118 of file PlayGround.hxx.
◆ PartDefinition() [1/2]
PartDefinition::PartDefinition |
( |
const PlayGround * |
pg | ) |
|
|
protected |
Definition at line 590 of file PlayGround.cxx.
YACS::BASES::AutoConstRefCnt< PlayGround > _pg
References _pg.
◆ PartDefinition() [2/2]
◆ ~PartDefinition()
PartDefinition::~PartDefinition |
( |
| ) |
|
|
protectedvirtual |
◆ BuildFrom()
◆ computeWorkerIdsCovered()
std::vector< std::size_t > PartDefinition::computeWorkerIdsCovered |
( |
int |
nbCoresPerComp | ) |
const |
◆ copy()
◆ getCoresOn()
virtual std::vector<bool> YACS::ENGINE::PartDefinition::getCoresOn |
( |
| ) |
const |
|
pure virtual |
◆ getNumberOfCoresConsumed()
virtual int YACS::ENGINE::PartDefinition::getNumberOfCoresConsumed |
( |
| ) |
const |
|
pure virtual |
◆ getPlayGround()
const PlayGround* YACS::ENGINE::PartDefinition::getPlayGround |
( |
| ) |
const |
|
inline |
◆ getSpaceSize()
int YACS::ENGINE::PartDefinition::getSpaceSize |
( |
| ) |
const |
|
inline |
◆ printSelf()
virtual std::string YACS::ENGINE::PartDefinition::printSelf |
( |
| ) |
const |
|
pure virtual |
◆ stashPart()
Definition at line 639 of file PlayGround.cxx.
641 if(nbCoresStashed<=0)
642 throw Exception(
"stashPart : Invalid nbCoresStashed value !");
643 if(weightOfRemain<=0.)
644 throw Exception(
"stashPart : Invalid weight !");
646 int nbCoresAvailable(std::count(coresOn.begin(),coresOn.end(),
true));
648 if(nbCoresAvailable==0)
649 throw Exception(
"PartDefinition::stashPart : no available cores !");
650 if(nbCoresAvailable<=nbCoresStashed)
652 int n0((
int)(1./(1.+weightOfRemain)*nbCoresAvailable)); n0=std::max(n0,1);
653 int n1(nbCoresAvailable-n0);
661 std::vector<int> ids0(ids.begin(),ids.begin()+n0),ids1(ids.begin()+n0,ids.end());
668 std::vector<int> ids0(ids.begin(),ids.begin()+nbCoresStashed),ids1(ids.begin()+nbCoresStashed,ids.end());
const PlayGround * getPlayGround() const
static YACS::BASES::AutoRefCnt< PartDefinition > BuildFrom(const PlayGround *pg, const std::vector< int > &coreIds)
static std::vector< int > BuildVectOfIdsFromVecBool(const std::vector< bool > &v)
References BuildFrom(), YACS::ENGINE::PlayGround::BuildVectOfIdsFromVecBool(), getCoresOn(), and getPlayGround().
◆ _pg
The documentation for this class was generated from the following files: