#include <PlayGround.hxx>


Public Member Functions | |
| PlayGround (const std::vector< std::pair< std::string, int > > &defOfRes) | |
| PlayGround () | |
| std::string | printSelf () const |
| void | loadFromKernelCatalog () |
| std::vector< std::pair< std::string, int > > | getData () const |
| void | setData (const std::vector< std::pair< std::string, int > > &defOfRes) |
| int | getNumberOfCoresAvailable () const |
| int | getMaxNumberOfContainersCanBeHostedWithoutOverlap (int nbCoresPerCont) const |
| std::vector< int > | computeOffsets () const |
| std::vector< YACS::BASES::AutoRefCnt< PartDefinition > > | partition (const std::vector< std::pair< const PartDefinition *, const ComplexWeight * > > &parts, const std::vector< int > &nbCoresPerShot) const |
| int | fromWorkerIdToResId (int workerId, int nbProcPerNode) const |
| std::string | deduceMachineFrom (int workerId, int nbProcPerNode) const |
| int | getNumberOfWorkers (int nbCoresPerWorker) const |
| void | highlightOnIds (const std::vector< int > &coreIds, std::vector< bool > &v) const |
| std::vector< bool > | getFetchedCores (int nbCoresPerWorker) const |
| std::vector< std::size_t > | getWorkerIdsFullyFetchedBy (int nbCoresPerComp, const std::vector< bool > &coreFlags) const |
| std::size_t | getNumberOfFreePlace (int nbCoresPerCont) const |
| std::vector< std::size_t > | allocateFor (std::size_t nbOfPlacesToTake, int nbCoresPerCont) const |
| void | release (std::size_t workerId, int nbCoresPerCont) const |
| std::mutex & | getLocker () const |
| void | printMe () const |
Public Member Functions inherited from YACS::ENGINE::RefCounter | |
| unsigned int | getRefCnt () const |
| void | incrRef () const |
| bool | decrRef () const |
Static Public Member Functions | |
| static std::vector< int > | BuildVectOfIdsFromVecBool (const std::vector< bool > &v) |
| static std::vector< int > | GetIdsMatching (const std::vector< bool > &bigArr, const std::vector< bool > &pat) |
Private Member Functions | |
| std::vector< std::pair< const ComplexWeight *, int > > | bigToTiny (const std::vector< std::pair< const ComplexWeight *, int > > &weights, std::map< int, int > &saveOrder) const |
| std::vector< std::vector< int > > | backToOriginalOrder (const std::vector< std::vector< int > > &disorderVec, const std::map< int, int > &saveOrder) const |
| int | getCriticalPath (const std::vector< std::pair< const ComplexWeight *, int > > &weights, const std::vector< int > &maxNbOfCores) const |
| std::vector< std::vector< int > > | splitIntoParts (const std::vector< int > &coreIds, const std::vector< std::pair< const ComplexWeight *, int > > &weights) const |
| std::vector< int > | takePlace (int maxNbOfCoresToAlloc, int nbCoresPerShot, std::vector< bool > &distributionOfCores, bool lastOne=false) const |
| void | checkCoherentInfo () const |
| ~PlayGround () | |
Private Attributes | |
| std::mutex | _locker |
| std::vector< Resource > | _data |
Additional Inherited Members | |
Static Public Attributes inherited from YACS::ENGINE::RefCounter | |
| static unsigned int | _totalCnt =0 |
Protected Member Functions inherited from YACS::ENGINE::RefCounter | |
| RefCounter () | |
| RefCounter (const RefCounter &other) | |
| virtual | ~RefCounter () |
Protected Attributes inherited from YACS::ENGINE::RefCounter | |
| unsigned int | _cnt |
Definition at line 76 of file PlayGround.hxx.
|
inline |
Definition at line 79 of file PlayGround.hxx.
|
inline |
Definition at line 80 of file PlayGround.hxx.
|
private |
Definition at line 584 of file PlayGround.cxx.
| std::vector< std::size_t > PlayGround::allocateFor | ( | std::size_t | nbOfPlacesToTake, |
| int | nbCoresPerCont | ||
| ) | const |
Definition at line 194 of file PlayGround.cxx.
References _data.
|
private |
Definition at line 451 of file PlayGround.cxx.
References yacsorb.CORBAEngineTest::i.
Referenced by splitIntoParts().
|
private |
Definition at line 427 of file PlayGround.cxx.
References yacsorb.CORBAEngineTest::i.
Referenced by splitIntoParts().
|
static |
Definition at line 234 of file PlayGround.cxx.
References gui.graph::distance(), and yacsorb.CORBAEngineTest::i.
Referenced by partition(), and YACS::ENGINE::PartDefinition::stashPart().
|
private |
| std::vector< int > PlayGround::computeOffsets | ( | ) | const |
Definition at line 148 of file PlayGround.cxx.
References _data, and yacsorb.CORBAEngineTest::i.
Referenced by takePlace().
| std::string PlayGround::deduceMachineFrom | ( | int | workerId, |
| int | nbProcPerNode | ||
| ) | const |
you must garantee coherence between PlayGround::deduceMachineFrom, PlayGround::getNumberOfWorkers, and PartDefinition::computeWorkerIdsCovered
Definition at line 570 of file PlayGround.cxx.
References _data, and fromWorkerIdToResId().
Referenced by YACS::ENGINE::SalomeContainerToolsDecorator::getParameters().
| int PlayGround::fromWorkerIdToResId | ( | int | workerId, |
| int | nbProcPerNode | ||
| ) | const |
Definition at line 553 of file PlayGround.cxx.
References _data, and yacsorb.CORBAEngineTest::i.
Referenced by deduceMachineFrom().
|
private |
Definition at line 462 of file PlayGround.cxx.
References yacsorb.CORBAEngineTest::i.
Referenced by splitIntoParts().
|
inline |
Definition at line 83 of file PlayGround.hxx.
| std::vector<bool> YACS::ENGINE::PlayGround::getFetchedCores | ( | int | nbCoresPerWorker | ) | const |
|
static |
Definition at line 170 of file PlayGround.cxx.
References yacsorb.CORBAEngineTest::i, and gui.Appli::t.
Referenced by partition().
|
inline |
Definition at line 101 of file PlayGround.hxx.
| int PlayGround::getMaxNumberOfContainersCanBeHostedWithoutOverlap | ( | int | nbCoresPerCont | ) | const |
Definition at line 138 of file PlayGround.cxx.
References _data.
Referenced by getNumberOfWorkers().
| int PlayGround::getNumberOfCoresAvailable | ( | ) | const |
Definition at line 130 of file PlayGround.cxx.
References _data.
Referenced by YACS::ENGINE::PartDefinition::BuildFrom(), YACS::ENGINE::Bloc::fitToPlayGround(), highlightOnIds(), partition(), and splitIntoParts().
| std::size_t PlayGround::getNumberOfFreePlace | ( | int | nbCoresPerCont | ) | const |
Definition at line 184 of file PlayGround.cxx.
References _data.
Referenced by YACS::ENGINE::SalomeHPContainer::getNumberOfFreePlace().
| int PlayGround::getNumberOfWorkers | ( | int | nbCoresPerWorker | ) | const |
you must garantee coherence between PlayGround::deduceMachineFrom, PlayGround::getNumberOfWorkers, PlayGround::getFetchedCores and PartDefinition::computeWorkerIdsCovered
Definition at line 579 of file PlayGround.cxx.
References getMaxNumberOfContainersCanBeHostedWithoutOverlap().
Referenced by YACS::ENGINE::Bloc::fitToPlayGround(), and YACS::ENGINE::SalomeContainerToolsDecorator::getParameters().
| std::vector< std::size_t > PlayGround::getWorkerIdsFullyFetchedBy | ( | int | nbCoresPerComp, |
| const std::vector< bool > & | coreFlags | ||
| ) | const |
you must garantee coherence between PlayGround::deduceMachineFrom, PlayGround::getNumberOfWorkers, and PartDefinition::computeWorkerIdsCovered
follow getMaxNumberOfContainersCanBeHostedWithoutOverlap method
Definition at line 280 of file PlayGround.cxx.
References _data.
| void PlayGround::highlightOnIds | ( | const std::vector< int > & | coreIds, |
| std::vector< bool > & | v | ||
| ) | const |
Definition at line 248 of file PlayGround.cxx.
References getNumberOfCoresAvailable().
Referenced by splitIntoParts().
| void PlayGround::loadFromKernelCatalog | ( | ) |
Definition at line 115 of file PlayGround.cxx.
References YACS::ENGINE::getRuntime(), testCppPluginInvokation::r, and setData().
| std::vector< YACS::BASES::AutoRefCnt< PartDefinition > > PlayGround::partition | ( | const std::vector< std::pair< const PartDefinition *, const ComplexWeight * > > & | parts, |
| const std::vector< int > & | nbCoresPerShot | ||
| ) | const |
Definition at line 298 of file PlayGround.cxx.
References YACS::ENGINE::PartDefinition::BuildFrom(), BuildVectOfIdsFromVecBool(), YACS::ENGINE::PartDefinition::copy(), YACS::ENGINE::PartDefinition::getCoresOn(), GetIdsMatching(), getNumberOfCoresAvailable(), YACS::ENGINE::PartDefinition::getPlayGround(), yacsorb.CORBAEngineTest::i, and splitIntoParts().
Referenced by YACS::ENGINE::ForkBlocPoint::partitionRegardingDPL().
| void PlayGround::printMe | ( | ) | const |
| std::string PlayGround::printSelf | ( | ) | const |
| void PlayGround::release | ( | std::size_t | workerId, |
| int | nbCoresPerCont | ||
| ) | const |
Definition at line 210 of file PlayGround.cxx.
References _data.
Referenced by YACS::ENGINE::SalomeHPContainer::release().
| void PlayGround::setData | ( | const std::vector< std::pair< std::string, int > > & | defOfRes | ) |
Definition at line 124 of file PlayGround.cxx.
References _data, and checkCoherentInfo().
Referenced by loadFromKernelCatalog().
|
private |
Definition at line 360 of file PlayGround.cxx.
References backToOriginalOrder(), bigToTiny(), getCriticalPath(), getNumberOfCoresAvailable(), highlightOnIds(), yacsorb.CORBAEngineTest::i, and takePlace().
Referenced by partition().
|
private |
Definition at line 487 of file PlayGround.cxx.
References computeOffsets(), yacsorb.CORBAEngineTest::i, and gui.Appli::t.
Referenced by splitIntoParts().
|
private |
Definition at line 115 of file PlayGround.hxx.
Referenced by allocateFor(), checkCoherentInfo(), computeOffsets(), deduceMachineFrom(), fromWorkerIdToResId(), getMaxNumberOfContainersCanBeHostedWithoutOverlap(), getNumberOfCoresAvailable(), getNumberOfFreePlace(), getWorkerIdsFullyFetchedBy(), printMe(), printSelf(), release(), and setData().
|
mutableprivate |
Definition at line 114 of file PlayGround.hxx.