#include "sdf3arch.h"
#include "base/base.h"
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) |
Node * | createNode (uint x, uint y) |
Node * | getNode (uint x, uint y) |
Edge * | createEdge (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 |
ArchGraph * | archGraph = NULL |
MTRand | mtRand |
Typedef Documentation
typedef struct _ArchGraph ArchGraph |
typedef Edges::const_iterator EdgesCIter |
typedef Edges::iterator EdgesIter |
typedef Nodes::const_iterator NodesCIter |
typedef Nodes::iterator NodesIter |
Function Documentation
createChildrenTreeNode () Recursive creation of tree with specified depth and degree per node.
References createEdge(), and createNode().
Referenced by createTreeArchitecture().
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().
createMeshArchitecture () The function creates a mesh architecture with the specified dimensions.
References createEdge(), createNode(), and getNode().
Referenced by generateArchitecture().
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().
createTorusArchitecture () The function creates a torus architecture with the specified dimensions.
References createEdge(), createNode(), and getNode().
Referenced by generateArchitecture().
createTreeArchitecture () The function creates a tree architecture with the specified dimensions.
References createChildrenTreeNode(), and createNode().
Referenced by generateArchitecture().
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().
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().
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.
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.
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().
void setDefaults | ( | ) |
setDefaults () Set all settings at their default value.
References Settings::type.