FSMSADF::MPExploreBindingAware::State Class Reference

#include <mpexplore_binding_aware.h>

Collaboration diagram for FSMSADF::MPExploreBindingAware::State:

List of all members.

Public Member Functions

 State (SGraph *G, bool allocateMemory)
 State (size_t sz, bool allocateMemory)
 ~State ()
Statecopy ()
MPTime consume (Scenario *s, Port *p)
void produce (Scenario *s, Port *p, MPTime t)
bool actorEnabled (SGraph *G, Actor *a)
size_t hashValue () const
bool equals (const State *s) const
int compare (const State *s) const
Stateminus (State *v) const
void add (double factor, State *v)
TokenfirstToken ()
MPDelay normalize ()
MPTime norm ()
void smooth (State *y)
MaxPlus::VectorasVector ()
uint getPosStaticOrderSchedule (Processor *p) const
void setPosStaticOrderSchedule (Processor *p, uint pos)

Static Public Member Functions

static StatezeroState (SGraph *G)
static StatefromVector (SGraph *G, MaxPlus::Vector *v)
static StatezeroScheduleState (SGraph *G)

Private Member Functions

void initFifos (size_t sz, bool allocateMemory)
void initSchedules (SGraph *G)

Private Attributes

vector< TokenFIFO * > fifos
map< Processor *, uintposStaticOrderSchedules

Detailed Description

class State State represents a distribution of timestamped tokens over the channels of the graph.


Constructor & Destructor Documentation

FSMSADF::MPExploreBindingAware::State::State ( SGraph G,
bool  allocateMemory 
)

State() Constructor.

References FSMSADF::ScenarioGraph::getChannels(), initFifos(), initSchedules(), and FSMSADF::MPExploreBindingAware::SGraph::scenarioGraph.

Referenced by copy(), and minus().

Here is the call graph for this function:

FSMSADF::MPExploreBindingAware::State::State ( size_t  sz,
bool  allocateMemory 
)

State() Constructor.

References initFifos().

Here is the call graph for this function:

FSMSADF::MPExploreBindingAware::State::~State (  ) 

~State() Destructor.

References fifos.


Member Function Documentation

bool FSMSADF::MPExploreBindingAware::State::actorEnabled ( SGraph G,
Actor a 
)

actorEnabled() The function returns true when the actor is enabled (i.e. ready to fire). Otherwise the function returns false.

void FSMSADF::MPExploreBindingAware::State::add ( double  factor,
State v 
)

add() The function performs a add operation on all FIFOs.

References FSMSADF::MPExploreBindingAware::TokenFIFO::add(), and fifos.

Here is the call graph for this function:

MaxPlus::Vector * FSMSADF::MPExploreBindingAware::State::asVector ( void   ) 

asVector() The function returns the token production times as a MaxPlus vector.

References fifos.

int FSMSADF::MPExploreBindingAware::State::compare ( const State s  )  const

compare() The function implements a comparison to generate a total order for MS hash_set return -1 if receiver smaller than s, 0 if equal, otherwise 1 performs a lexicographical order on all FIFOs.

MPTime FSMSADF::MPExploreBindingAware::State::consume ( Scenario s,
Port p 
) [inline]
State * FSMSADF::MPExploreBindingAware::State::copy (  ) 

copy() The function returns a copy of this state.

References fifos, posStaticOrderSchedules, and State().

Here is the call graph for this function:

bool FSMSADF::MPExploreBindingAware::State::equals ( const State s  )  const

equal() The function performs an equals operation on all FIFOs.

References fifos, and posStaticOrderSchedules.

Referenced by FSMSADF::MPExploreBindingAware::StateComparator::operator()().

Token * FSMSADF::MPExploreBindingAware::State::firstToken (  ) 

firstToken() The function returns a pointer to the first token in any of the FIFOs. When all FIFOs are empty, the function returns NULL.

State * FSMSADF::MPExploreBindingAware::State::fromVector ( SGraph G,
MaxPlus::Vector v 
) [static]

fromVector() Initialize this state as an initial state (i.e. channels contains only initial tokens and no time has passed so far). The production times of the initial tokens are taken from the vector v.

uint FSMSADF::MPExploreBindingAware::State::getPosStaticOrderSchedule ( Processor p  )  const

getPosStaticOrderSchedule() The function returns the position of the static-order schedule of processor p in this state.

size_t FSMSADF::MPExploreBindingAware::State::hashValue (  )  const

hashValue() The function returns a hash value for this state.

References fifos.

Referenced by FSMSADF::MPExploreBindingAware::StateHasher::operator()().

void FSMSADF::MPExploreBindingAware::State::initFifos ( size_t  sz,
bool  allocateMemory 
) [private]

initFifos() Initialize the fifos.

References fifos, and TokenFIFO.

Referenced by State().

void FSMSADF::MPExploreBindingAware::State::initSchedules ( SGraph G  )  [private]
State * FSMSADF::MPExploreBindingAware::State::minus ( State v  )  const

minus() The function performs a minus operation on all FIFOs.

References fifos, FSMSADF::MPExploreBindingAware::TokenFIFO::minus(), and State().

Here is the call graph for this function:

MPTime FSMSADF::MPExploreBindingAware::State::norm (  ) 

norm() The function returns the norm of the token production times.

References fifos, and MaxPlus::MP_MAX().

Referenced by normalize().

Here is the call graph for this function:

MPDelay FSMSADF::MPExploreBindingAware::State::normalize (  ) 

normalize() The function normalizes the production time of the tokens in all FIFOs.

References fifos, and norm().

Here is the call graph for this function:

void FSMSADF::MPExploreBindingAware::State::produce ( Scenario s,
Port p,
MPTime  t 
) [inline]
void FSMSADF::MPExploreBindingAware::State::setPosStaticOrderSchedule ( Processor p,
uint  pos 
)

setPosStaticOrderSchedule() The function sets the position of the static-order schedule of processor p in this state.

Referenced by initSchedules().

void FSMSADF::MPExploreBindingAware::State::smooth ( State y  ) 

smooth() The function performs a smooth operation on all FIFOs.

References fifos.

State * FSMSADF::MPExploreBindingAware::State::zeroScheduleState ( SGraph G  )  [static]

zeroScheduleState() Initialize this state (i.e. channels contains only initial tokens). The production times of the initial tokens are equal to a counter which is raised on each initial tokens that is placed in a FIFO.

State * FSMSADF::MPExploreBindingAware::State::zeroState ( SGraph G  )  [static]

zeroState() Initialize this state as an initial state (i.e. channels contains only initial tokens and no time has passed so far).


Member Data Documentation


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