| 226 | // diamond-shaped pipelines. |
| 227 | int stageInstanceId = 1; |
| 228 | struct StageInstance |
| 229 | { |
| 230 | Stage *m_stage; |
| 231 | int m_id; |
| 232 | |
| 233 | StageInstance(Stage *s, int id) : m_stage(s), m_id(id) |
| 234 | {} |
| 235 | StageInstance() : m_stage(nullptr), m_id(0) |
| 236 | {} |
| 237 | |
| 238 | bool operator<(const StageInstance& other) const |
| 239 | { return m_id < other.m_id; } |
| 240 | }; |
| 241 | |
| 242 | std::stack<StageInstance> stages; |
| 243 | std::stack<StageInstance> pending; |