Version: 9.15.0
YACS::ENGINE::ContigPartDefinition Class Reference

#include <PlayGround.hxx>

Inheritance diagram for YACS::ENGINE::ContigPartDefinition:
Collaboration diagram for YACS::ENGINE::ContigPartDefinition:

Public Member Functions

 ContigPartDefinition (const PlayGround *pg, int zeStart, int zeStop)
 
 ContigPartDefinition (const ContigPartDefinition &other)
 
std::string printSelf () const
 
std::vector< bool > getCoresOn () const
 
int getStart () const
 
int getStop () const
 
ContigPartDefinitioncopy () const
 
int getNumberOfCoresConsumed () const
 
- Public Member Functions inherited from YACS::ENGINE::PartDefinition
const PlayGroundgetPlayGround () const
 
int getSpaceSize () const
 
void stashPart (int nbCoresStashed, double weightOfRemain, YACS::BASES::AutoRefCnt< PartDefinition > &pdStashed, YACS::BASES::AutoRefCnt< PartDefinition > &pdRemain) const
 
std::vector< std::size_t > computeWorkerIdsCovered (int nbCoresPerComp) const
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef () const
 

Private Member Functions

 ~ContigPartDefinition ()
 

Private Attributes

int _start
 
int _stop
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::PartDefinition
static YACS::BASES::AutoRefCnt< PartDefinitionBuildFrom (const PlayGround *pg, const std::vector< int > &coreIds)
 
- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 
- Protected Member Functions inherited from YACS::ENGINE::PartDefinition
 PartDefinition (const PlayGround *pg)
 
 PartDefinition (const PartDefinition &other)
 
virtual ~PartDefinition ()
 
- 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
 

Detailed Description

Definition at line 139 of file PlayGround.hxx.

Constructor & Destructor Documentation

◆ ContigPartDefinition() [1/2]

ContigPartDefinition::ContigPartDefinition ( const PlayGround pg,
int  zeStart,
int  zeStop 
)

Definition at line 685 of file PlayGround.cxx.

685  :PartDefinition(pg),_start(zeStart),_stop(zeStop)
686 {
687  if(_start<0 || _stop<_start || _stop>getSpaceSize())
688  throw Exception("ContigPartDefinition constructor : Invalid input values");
689 }
PartDefinition(const PlayGround *pg)
Definition: PlayGround.cxx:590

References _start, and YACS::ENGINE::PartDefinition::getSpaceSize().

Referenced by copy().

◆ ContigPartDefinition() [2/2]

ContigPartDefinition::ContigPartDefinition ( const ContigPartDefinition other)

Definition at line 691 of file PlayGround.cxx.

691  :PartDefinition(other),_start(other._start),_stop(other._stop)
692 {
693 }

◆ ~ContigPartDefinition()

YACS::ENGINE::ContigPartDefinition::~ContigPartDefinition ( )
inlineprivate

Definition at line 151 of file PlayGround.hxx.

151 { }

Member Function Documentation

◆ copy()

ContigPartDefinition * ContigPartDefinition::copy ( ) const
virtual

Implements YACS::ENGINE::PartDefinition.

Definition at line 710 of file PlayGround.cxx.

711 {
712  return new ContigPartDefinition(*this);
713 }
ContigPartDefinition(const PlayGround *pg, int zeStart, int zeStop)
Definition: PlayGround.cxx:685

References ContigPartDefinition().

◆ getCoresOn()

std::vector< bool > ContigPartDefinition::getCoresOn ( ) const
virtual

Implements YACS::ENGINE::PartDefinition.

Definition at line 702 of file PlayGround.cxx.

703 {
704  std::vector<bool> ret(getSpaceSize(),false);
705  for(int i=_start;i<_stop;i++)
706  ret[i]=true;
707  return ret;
708 }

References _start, _stop, YACS::ENGINE::PartDefinition::getSpaceSize(), and yacsorb.CORBAEngineTest::i.

◆ getNumberOfCoresConsumed()

int ContigPartDefinition::getNumberOfCoresConsumed ( ) const
virtual

Implements YACS::ENGINE::PartDefinition.

Definition at line 715 of file PlayGround.cxx.

716 {
717  return _stop-_start;
718 }

References _start, and _stop.

◆ getStart()

int YACS::ENGINE::ContigPartDefinition::getStart ( ) const
inline

Definition at line 146 of file PlayGround.hxx.

146 { return _start; }

◆ getStop()

int YACS::ENGINE::ContigPartDefinition::getStop ( ) const
inline

Definition at line 147 of file PlayGround.hxx.

147 { return _stop; }

◆ printSelf()

std::string ContigPartDefinition::printSelf ( ) const
virtual

Implements YACS::ENGINE::PartDefinition.

Definition at line 695 of file PlayGround.cxx.

696 {
697  std::ostringstream oss;
698  oss << "Contiguous : start=" << _start << " stop=" << _stop;
699  return oss.str();
700 }

References _start, and _stop.

Member Data Documentation

◆ _start

int YACS::ENGINE::ContigPartDefinition::_start
private

◆ _stop

int YACS::ENGINE::ContigPartDefinition::_stop
private

Definition at line 154 of file PlayGround.hxx.

Referenced by getCoresOn(), getNumberOfCoresConsumed(), and printSelf().


The documentation for this class was generated from the following files: