sdf3arch.cc File Reference

#include "sdf3arch.h"
#include "base/base.h"
Include dependency graph for sdf3arch.cc:

Classes

struct  _Edge
struct  _Node
struct  _ArchGraph
struct  _Settings

Typedefs

typedef struct _Edge Edge
typedef vector< Edge * > Edges
typedef Edges::iterator EdgesIter
typedef Edges::const_iterator EdgesCIter
typedef struct _Node Node
typedef vector< Node * > Nodes
typedef Nodes::iterator NodesIter
typedef Nodes::const_iterator NodesCIter
typedef struct _ArchGraph ArchGraph
typedef struct _Settings Settings

Functions

void helpMessage (ostream &out)
void parseCommandLine (int argc, char **argv)
void setDefaults ()
bool initSettings (int argc, char **argv)
uint lengthShortestPath (Node *src, Node *dst)
ostream & printArchitectureGraph (ostream &out)
NodecreateNode (uint x, uint y)
NodegetNode (uint x, uint y)
EdgecreateEdge (Node *src, Node *dst)
void createMeshArchitecture (const uint dimX, const uint dimY)
void createTorusArchitecture (const uint dimX, const uint dimY)
void createChildrenTreeNode (Node *parent, uint depth, const uint maxDepth, const uint degree)
void createTreeArchitecture (const uint dimX, const uint dimY)
void generateArchitecture (CString &type, uint dimX, uint dimY, ostream &out)
int main (int argc, char **argv)

Variables

Settings settings
ArchGrapharchGraph = NULL
MTRand mtRand

Typedef Documentation

typedef struct _ArchGraph ArchGraph
typedef struct _Edge Edge
typedef vector<Edge*> Edges
typedef Edges::const_iterator EdgesCIter
typedef Edges::iterator EdgesIter
typedef struct _Node Node
typedef vector<Node*> Nodes
typedef Nodes::const_iterator NodesCIter
typedef Nodes::iterator NodesIter
typedef struct _Settings Settings

Function Documentation

void createChildrenTreeNode ( Node parent,
uint  depth,
const uint  maxDepth,
const uint  degree 
)

createChildrenTreeNode () Recursive creation of tree with specified depth and degree per node.

References createEdge(), and createNode().

Referenced by createTreeArchitecture().

Here is the call graph for this function:

Edge* createEdge ( Node src,
Node dst 
)

createEdge () The function adds an edge from the supplied source to the supplied destination node in the architecture graph.

References _Edge::dstNode, _ArchGraph::edges, Node::name, _Edge::name, and _Edge::srcNode.

Referenced by createChildrenTreeNode(), createMeshArchitecture(), and createTorusArchitecture().

void createMeshArchitecture ( const uint  dimX,
const uint  dimY 
)

createMeshArchitecture () The function creates a mesh architecture with the specified dimensions.

References createEdge(), createNode(), and getNode().

Referenced by generateArchitecture().

Here is the call graph for this function:

Node* createNode ( uint  x,
uint  y 
)

createNode () The function adds a node to the architecture graph.

References Node::id, Node::name, and _ArchGraph::nodes.

Referenced by createChildrenTreeNode(), createMeshArchitecture(), createTorusArchitecture(), and createTreeArchitecture().

void createTorusArchitecture ( const uint  dimX,
const uint  dimY 
)

createTorusArchitecture () The function creates a torus architecture with the specified dimensions.

References createEdge(), createNode(), and getNode().

Referenced by generateArchitecture().

Here is the call graph for this function:

void createTreeArchitecture ( const uint  dimX,
const uint  dimY 
)

createTreeArchitecture () The function creates a tree architecture with the specified dimensions.

References createChildrenTreeNode(), and createNode().

Referenced by generateArchitecture().

Here is the call graph for this function:

void generateArchitecture ( CString type,
uint  dimX,
uint  dimY,
ostream &  out 
)

generateArchitecture () The function output an architecture of the given type with the specified sizes to the supplied stream.

References createMeshArchitecture(), createTorusArchitecture(), createTreeArchitecture(), and printArchitectureGraph().

Referenced by main().

Here is the call graph for this function:

Node* getNode ( uint  x,
uint  y 
)

getNode () The function returns a pointer to the node in the architecture graph

References _ArchGraph::nodes.

Referenced by createMeshArchitecture(), and createTorusArchitecture().

void helpMessage ( ostream &  out  ) 

helpMessage () Function prints help message for the tool.

References DOTTED_VERSION, and TOOL.

bool initSettings ( int  argc,
char **  argv 
)

initSettings () The function initializes the program settings.

References parseCommandLine(), and setDefaults().

Here is the call graph for this function:

uint lengthShortestPath ( Node src,
Node dst 
)

lengthShortestPath () The function returns the length of the shortest path from a node src to a node dst.

References _Edge::dstNode, Node::id, and _ArchGraph::nodes.

Referenced by printArchitectureGraph().

int main ( int  argc,
char **  argv 
)

main () It does none of the hard work, but it is very needed...

References generateArchitecture(), initSettings(), MaxPlusAnalysis::out, Settings::outputFile, and Settings::type.

Here is the call graph for this function:

void parseCommandLine ( int  argc,
char **  argv 
)

parseCommandLine () The function parses the command line arguments and add info to the supplied settings structure.

References helpMessage(), Settings::outputFile, and Settings::type.

Here is the call graph for this function:

ostream& printArchitectureGraph ( ostream &  out  ) 

printArchitectureGraph () The function outputs the architecture graph to the supplied stream as an XML document.

References _Edge::dstNode, _ArchGraph::edges, Node::id, lengthShortestPath(), _Node::name, Node::name, _ArchGraph::nodes, _Edge::srcNode, and Settings::type.

Referenced by generateArchitecture().

Here is the call graph for this function:

void setDefaults (  ) 

setDefaults () Set all settings at their default value.

References Settings::type.


Variable Documentation