CGRA-ME
OpGraphProcedures.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * The software programs comprising "CGRA-ME" and the documentation provided
3  * with them are copyright by its authors and the University of Toronto. Only
4  * non-commercial, not-for-profit use of this software is permitted without ex-
5  * plicit permission. This software is provided "as is" with no warranties or
6  * guarantees of support. See the LICENCE for more details. You should have re-
7  * ceived a copy of the full licence along with this software. If not, see
8  * <http://cgra-me.ece.utoronto.ca/license/>.
9  ******************************************************************************/
10 
11 #ifndef OPGRAPH_PROCEDURES_H___
12 #define OPGRAPH_PROCEDURES_H___
13 
14 #include <CGRA/OpGraph.h>
15 
16 // forward declarations
17 class ConfigGraph; // in <CGRA/utility/ConfigGraph.h>
18 struct TrailsToBalance;
19 
66 
68  // a sequence of *unique* (hyper) edges.
70  using TrailPair = std::pair<Trail,Trail>;
71 
72  // A set of pairs of trails that should have the same latency -- re-convergence
73  std::set<TrailPair> noncyclic_trail_pairs = {};
74 
75  // A set of trails that must have latency of II -- cycles
76  std::set<Trail> cyclic_trails = {};
77 
78  // Dump this to `os` in a human-readable format.
79  void print_to(std::ostream& os) const; // (operator<< is defined later)
80  bool operator==(const TrailsToBalance& rhs) const {
81  return std::tie(noncyclic_trail_pairs, cyclic_trails)
82  == std::tie(rhs.noncyclic_trail_pairs, rhs.cyclic_trails);
83  }
84 };
85 
95 
100 
105 
116 
125 
133 
134 inline std::ostream& operator<<(std::ostream& os, const TrailsToBalance& ptb) { ptb.print_to(os); return os; }
135 
136 #endif /* OPGRAPH_PROCEDURES_H___ */
OpGraph.h
propagateConstants
OpGraph propagateConstants(OpGraph og)
Definition: OpGraphProcedures.cpp:373
TrailsToBalance::noncyclic_trail_pairs
std::set< TrailPair > noncyclic_trail_pairs
Definition: OpGraphProcedures.h:73
operator<<
std::ostream & operator<<(std::ostream &os, const TrailsToBalance &ptb)
Definition: OpGraphProcedures.h:134
removePhiNodes
OpGraph removePhiNodes(OpGraph opgraph)
Definition: OpGraphProcedures.cpp:334
ConfigGraph
Definition: ConfigGraph.h:72
TrailsToBalance
Definition: OpGraphProcedures.h:67
TrailsToBalance::cyclic_trails
std::set< Trail > cyclic_trails
Definition: OpGraphProcedures.h:76
TrailsToBalance::TrailPair
std::pair< Trail, Trail > TrailPair
Definition: OpGraphProcedures.h:70
computeTrailsToBalance
TrailsToBalance computeTrailsToBalance(const OpGraph &op_graph)
Definition: OpGraphProcedures.cpp:40
createOpGraphFromConfig
OpGraph createOpGraphFromConfig(const ConfigGraph &config)
Definition: OpGraphProcedures.cpp:187
TrailsToBalance::operator==
bool operator==(const TrailsToBalance &rhs) const
Definition: OpGraphProcedures.h:80
distributeConstants
OpGraph distributeConstants(OpGraph og)
Definition: OpGraphProcedures.cpp:455
removeCastNodes
OpGraph removeCastNodes(OpGraph og)
Definition: OpGraphProcedures.cpp:313
TrailsToBalance::print_to
void print_to(std::ostream &os) const
Definition: OpGraphProcedures.cpp:171
TrailsToBalance::Trail
OpGraph::Walk Trail
Definition: OpGraphProcedures.h:69
OpGraph::Walk
std::vector< EdgeDescriptor > Walk
Definition: OpGraph.h:231
OpGraph
Definition: OpGraph.h:215
removeBranchComputation
OpGraph removeBranchComputation(OpGraph opgraph)
Definition: OpGraphProcedures.cpp:305