| 553 | } |
| 554 | |
| 555 | double ComputingGraphImpl::ComputingSequence::get_prev_exec_time() const { |
| 556 | check_not_finalized(); |
| 557 | mgb_assert(m_wait_finished); |
| 558 | if (m_prev_exec_time.valid()) { |
| 559 | return m_prev_exec_time.val(); |
| 560 | } |
| 561 | if (!m_have_parent_graph) { |
| 562 | double max_time = 0; |
| 563 | for (auto cn : m_used_comp_node) { |
| 564 | update_max( |
| 565 | max_time, |
| 566 | m_event_start.at(cn)->elapsed_time_until(*m_event_end.at(cn))); |
| 567 | } |
| 568 | m_prev_exec_time = max_time; |
| 569 | return max_time; |
| 570 | } |
| 571 | return 0; |
| 572 | } |
| 573 | |
| 574 | AsyncExecutable& ComputingGraphImpl::ComputingSequence::iter_opr_seq( |
| 575 | thin_function<bool(OperatorNodeBase*)> cb) { |