csdf/base/algo/components.cc File Reference
#include "components.h"
#include "dfs.h"
Functions | |
static void | treeVisitChildren (CSDFgraph *g, CSDFactor **pi, CSDFactor *u, CSDFgraphComponent &comp) |
static CSDFgraphComponents | getComponents (CSDFgraph *g, CSDFactor **pi) |
CSDFgraphComponents | stronglyConnectedComponents (CSDFgraph *g) |
bool | actorInComponent (CSDFactor *a, CSDFgraphComponent &component) |
bool | isStronglyConnectedGraph (CSDFgraph *g) |
CSDFgraph * | componentToCSDFgraph (CSDFgraphComponent &component) |
Function Documentation
bool actorInComponent | ( | CSDFactor * | a, | |
CSDFgraphComponent & | component | |||
) |
actorInComponent () The function check wether an actor is in a component. If so, the function returns true. Else it returns false.
References CSDFcomponent::getId().
Referenced by componentToCSDFgraph(), componentToSDFgraph(), makeStronglyConnected(), and sdfComponentToGraph().
CSDFgraph* componentToCSDFgraph | ( | CSDFgraphComponent & | component | ) |
componentToSDFgraph () The function returns an SDF graph containing all actors and channels inside the component.
References a, actorInComponent(), c, CSDFgraph::clone(), g, CSDFchannel::getDstActor(), CSDFchannel::getDstPort(), CSDFcomponent::getId(), CSDFcomponent::getName(), CSDFcomponent::getParent(), CSDFchannel::getSrcActor(), CSDFchannel::getSrcPort(), CSDFactor::removePort(), and v.
Referenced by CSDFstateSpaceThroughputAnalysis::analyze().
static CSDFgraphComponents getComponents | ( | CSDFgraph * | g, | |
CSDFactor ** | 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 CSDFgraph::getActor(), CSDFgraph::nrActors(), and treeVisitChildren().
Referenced by stronglyConnectedComponents().
bool isStronglyConnectedGraph | ( | CSDFgraph * | g | ) |
isStronglyConnectedGraph () The function checks that the graph is a strongly connnected component.
References c, and stronglyConnectedComponents().
Referenced by SDFstateSpaceBindingAwareThroughputAnalysis::analyze(), SDFstateSpaceThroughputAnalysis::analyze(), CSDFstateSpaceThroughputAnalysis::analyze(), SDFstateSpaceSelfTimedMinimalLatencyAnalysis::analyze(), SDFstateSpaceSelfTimedLatencyAnalysis::analyze(), SDFstateSpaceMinimalLatencyAnalysis::analyze(), SDFstateSpaceMinimalLatencyAnalysis::analyzeSingleProc(), makeStronglyConnected(), maximumCycleMeanDasdanGupta(), maximumCycleMeanHoward(), maximumCycleMeanKarp(), maximumCycleYoungTarjanOrlin(), SDFstateSpaceStaticPeriodicSchedulerChao::schedule(), SDFstateSpaceStaticPeriodicScheduler::schedule(), SDFstateSpacePriorityListScheduler::schedule(), SDFstateSpaceListScheduler::schedule(), stateSpaceAbstractDepGraph(), and SDFstateSpaceTraceInterconnectCommunication::trace().
CSDFgraphComponents stronglyConnectedComponents | ( | CSDFgraph * | g | ) |
stronglyConnectedComponents () The function determines the strongly connected components in the graph.
References ASSERT, dfs(), getComponents(), CSDFgraph::nrActors(), and pi.
Referenced by SDFstateSpaceThroughputAnalysis::analyze(), CSDFstateSpaceThroughputAnalysis::analyze(), analyzeSDFG(), distributeInitialTokens(), findSimpleCycle(), findSimpleCycles(), isAcyclic(), isStronglyConnectedGraph(), makeStronglyConnected(), and mcmSimpleCycles().
static void treeVisitChildren | ( | CSDFgraph * | g, | |
CSDFactor ** | pi, | |||
CSDFactor * | u, | |||
CSDFgraphComponent & | 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 CSDFgraph::getActor(), CSDFcomponent::getId(), CSDFgraph::nrActors(), and v.
Referenced by getComponents().