sdf/base/algo/components.cc File Reference

#include "components.h"
#include "dfs.h"
Include dependency graph for sdf/base/algo/components.cc:

Functions

static void treeVisitChildren (SDFgraph *g, SDFactor **pi, SDFactor *u, SDFgraphComponent &comp)
static SDFgraphComponents getComponents (SDFgraph *g, SDFactor **pi)
SDFgraphComponents stronglyConnectedComponents (SDFgraph *g)
bool actorInComponent (SDFactor *a, SDFgraphComponent &component)
bool isStronglyConnectedGraph (SDFgraph *g)
SDFgraphcomponentToSDFgraph (SDFgraphComponent &component)

Function Documentation

bool actorInComponent ( SDFactor a,
SDFgraphComponent component 
)

actorInComponent () The function check wether an actor is in a component. If so, the function returns true. Else it returns false.

References SDFcomponent::getId().

Here is the call graph for this function:

SDFgraph* componentToSDFgraph ( SDFgraphComponent component  ) 

componentToSDFgraph () The function returns an SDF graph containing all actors and channels inside the component.

References a, actorInComponent(), c, SDFgraph::clone(), g, SDFchannel::getDstActor(), SDFchannel::getDstPort(), SDFcomponent::getId(), SDFcomponent::getName(), SDFcomponent::getParent(), SDFchannel::getSrcActor(), SDFchannel::getSrcPort(), SDFactor::removePort(), and v.

Referenced by SDFstateSpaceThroughputAnalysis::analyze(), and distributeInitialTokensInComponent().

Here is the call graph for this function:

static SDFgraphComponents getComponents ( SDFgraph g,
SDFactor **  pi 
) [static]

getComponents () The function determines the strongly connected components in the graph. To do this, it performs depth-first walk on the forest given by 'pi'.

References SDFgraph::getActor(), SDFgraph::nrActors(), and treeVisitChildren().

Referenced by stronglyConnectedComponents().

Here is the call graph for this function:

bool isStronglyConnectedGraph ( SDFgraph g  ) 

isStronglyConnectedGraph () The function checks that the graph is a strongly connnected component.

References c, and stronglyConnectedComponents().

Here is the call graph for this function:

SDFgraphComponents stronglyConnectedComponents ( SDFgraph g  ) 

stronglyConnectedComponents () The function determines the strongly connected components in the graph.

References ASSERT, dfs(), getComponents(), SDFgraph::nrActors(), and pi.

Here is the call graph for this function:

static void treeVisitChildren ( SDFgraph g,
SDFactor **  pi,
SDFactor u,
SDFgraphComponent comp 
) [static]

treeVisitChildren () The function visits all children of the actor 'u'. The parent-child relation is given via the vector 'pi'. Each child is added to the component 'comp'.

References SDFgraph::getActor(), SDFcomponent::getId(), SDFgraph::nrActors(), and v.

Referenced by getComponents().

Here is the call graph for this function: