PaCO++  0.05
paco_comSchedule_libgraph Class Reference

#include <paco_libgraph_comScheduling.h>

Inheritance diagram for paco_comSchedule_libgraph:
Inheritance graph
Collaboration diagram for paco_comSchedule_libgraph:
Collaboration graph

Public Member Functions

void build_idx ()
 
kbps_approximation * get_kbps () const
 
unsigned int getDst (const unsigned phase, const unsigned id)
 
unsigned int getElementPhase (const unsigned phase)
 
void * getInfo (const unsigned phase, const unsigned id)
 
unsigned int getNbPhases ()
 
unsigned int getSize (const unsigned phase, const unsigned id)
 
unsigned int getSrc (const unsigned phase, const unsigned id)
 
 paco_comSchedule_libgraph (kbps_approximation *k)
 

Protected Member Functions

unsigned int _idx (const unsigned phase, const unsigned id)
 

Protected Attributes

kbps_approximation * _kbps
 
unsigned int * _tmp_idx
 

Detailed Description

Definition at line 7 of file paco_libgraph_comScheduling.h.

Constructor & Destructor Documentation

◆ paco_comSchedule_libgraph()

paco_comSchedule_libgraph::paco_comSchedule_libgraph ( kbps_approximation *  k)
inline

Definition at line 19 of file paco_libgraph_comScheduling.h.

19 : _kbps(k), _tmp_idx(NULL) {}

Member Function Documentation

◆ _idx()

unsigned int paco_comSchedule_libgraph::_idx ( const unsigned  phase,
const unsigned  id 
)
inlineprotected

Definition at line 13 of file paco_libgraph_comScheduling.h.

Referenced by getDst(), getInfo(), getSize(), and getSrc().

14  {
15  return _tmp_idx[phase]+id;
16  }

◆ build_idx()

void paco_comSchedule_libgraph::build_idx ( )
inline

Definition at line 23 of file paco_libgraph_comScheduling.h.

References _tmp_idx, getElementPhase(), and getNbPhases().

Referenced by paco_comScheduling_libgraph::computeScheduling().

24  {
25  if (_tmp_idx) {
26  delete[] _tmp_idx;
27  }
28 
29  _tmp_idx = new unsigned int[this->getNbPhases()];
30  _tmp_idx[0]=0;
31  for(unsigned i=1;i<getNbPhases(); i++)
32  _tmp_idx[i]=_tmp_idx[i-1]+getElementPhase(i-1);
33  }
unsigned int getElementPhase(const unsigned phase)
Here is the call graph for this function:

◆ get_kbps()

kbps_approximation* paco_comSchedule_libgraph::get_kbps ( ) const
inline

Definition at line 21 of file paco_libgraph_comScheduling.h.

References _kbps.

Referenced by paco_comScheduling_libgraph::computeScheduling().

21 { return _kbps; }

◆ getDst()

unsigned int paco_comSchedule_libgraph::getDst ( const unsigned  phase,
const unsigned  id 
)
inlinevirtual

Implements paco_comSchedule.

Definition at line 46 of file paco_libgraph_comScheduling.h.

References _idx().

47  {
48  return _kbps->comms[_idx(phase, id)].dst;
49  }
unsigned int _idx(const unsigned phase, const unsigned id)
Here is the call graph for this function:

◆ getElementPhase()

unsigned int paco_comSchedule_libgraph::getElementPhase ( const unsigned  phase)
inlinevirtual

Implements paco_comSchedule.

Definition at line 38 of file paco_libgraph_comScheduling.h.

Referenced by build_idx().

39  {
40  return _kbps->infophases[phase+1];
41  }

◆ getInfo()

void* paco_comSchedule_libgraph::getInfo ( const unsigned  phase,
const unsigned  id 
)
inlinevirtual

Implements paco_comSchedule.

Definition at line 55 of file paco_libgraph_comScheduling.h.

References _idx().

56  {
57  return _kbps->comms[_idx(phase, id)].info;
58  }
unsigned int _idx(const unsigned phase, const unsigned id)
Here is the call graph for this function:

◆ getNbPhases()

unsigned int paco_comSchedule_libgraph::getNbPhases ( )
inlinevirtual

Implements paco_comSchedule.

Definition at line 35 of file paco_libgraph_comScheduling.h.

Referenced by build_idx().

35  {
36  return _kbps->infophases[0];
37  }

◆ getSize()

unsigned int paco_comSchedule_libgraph::getSize ( const unsigned  phase,
const unsigned  id 
)
inlinevirtual

Implements paco_comSchedule.

Definition at line 50 of file paco_libgraph_comScheduling.h.

References _idx().

51  {
52  return _kbps->comms[_idx(phase, id)].weight;
53  }
unsigned int _idx(const unsigned phase, const unsigned id)
Here is the call graph for this function:

◆ getSrc()

unsigned int paco_comSchedule_libgraph::getSrc ( const unsigned  phase,
const unsigned  id 
)
inlinevirtual

Implements paco_comSchedule.

Definition at line 42 of file paco_libgraph_comScheduling.h.

References _idx().

43  {
44  return _kbps->comms[_idx(phase, id)].src;
45  }
unsigned int _idx(const unsigned phase, const unsigned id)
Here is the call graph for this function:

Member Data Documentation

◆ _kbps

kbps_approximation* paco_comSchedule_libgraph::_kbps
protected

Definition at line 10 of file paco_libgraph_comScheduling.h.

Referenced by get_kbps().

◆ _tmp_idx

unsigned int* paco_comSchedule_libgraph::_tmp_idx
protected

Definition at line 12 of file paco_libgraph_comScheduling.h.

Referenced by build_idx().


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