SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
typedefs.h
1 #ifndef _CORE_GRAPH_H_
2 #define _CORE_GRAPH_H_
3 
4 #include <boost/config.hpp>
5 #include <boost/graph/adjacency_list.hpp>
6 #include <boost/graph/graph_traits.hpp>
7 #include <boost/graph/graphviz.hpp>
8 #include <boost/graph/iteration_macros.hpp>
9 #include <boost/graph/properties.hpp>
10 #include <boost/graph/topological_sort.hpp>
11 
12 namespace smaug {
13 class TensorBase;
14 class Operator;
15 
22 struct TensorIndices {
23  int srcIdx;
24  int destIdx;
25 };
26 
27 } // namespace smaug
28 
29 namespace boost {
30  enum vertex_op_t { vertex_op };
31  BOOST_INSTALL_PROPERTY(vertex, op);
32 }
33 
34 typedef boost::property<boost::vertex_op_t, smaug::Operator*> VertexProperty;
35 typedef boost::property<boost::edge_name_t, smaug::TensorIndices> EdgeProperty;
36 typedef boost::adjacency_list<boost::vecS,
37  boost::vecS,
38  boost::bidirectionalS,
39  VertexProperty,
40  EdgeProperty> Graph;
41 typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
42 typedef boost::graph_traits<Graph>::edge_descriptor Edge;
43 typedef boost::graph_traits<Graph>::vertex_iterator vertex_iter;
44 typedef boost::graph_traits<Graph>::edge_iterator edge_iter;
45 typedef boost::graph_traits<Graph>::in_edge_iterator in_edge_iter;
46 typedef boost::graph_traits<Graph>::out_edge_iterator out_edge_iter;
47 typedef boost::property_map<Graph, boost::edge_name_t>::type MutableEdgeNameMap;
48 typedef boost::property_map<Graph, boost::vertex_op_t>::type
49  MutableVertexNameMap;
50 typedef boost::property_map<Graph, boost::edge_name_t>::const_type EdgeNameMap;
51 typedef boost::property_map<Graph, boost::vertex_op_t>::const_type
52  VertexNameMap;
53 
54 #endif
smaug::TensorIndices
Additional metadata for edges in the graph.
Definition: typedefs.h:22
smaug
The smaug namespace is the parent namespace of all C++ code in SMAUG.
Definition: backend.cpp:38