Skip to content

Commit

Permalink
Rm misleading sub-seq indexing in 'init_recursive'.
Browse files Browse the repository at this point in the history
  • Loading branch information
kouchy committed Nov 5, 2023
1 parent d2cfac5 commit 34c8d24
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Runtime/Sequence/Sequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ ::init_recursive(tools::Digraph_node<SS> *cur_subseq,
if (cur_subseq->get_contents() == nullptr)
{
cur_subseq->set_contents(new SS());
cur_subseq->get_c()->id = ssid++; // this sub-sequence indexing is wrong, it is fixed later in _init()
ssid++;
}

bool is_last = true;
Expand All @@ -891,7 +891,7 @@ ::init_recursive(tools::Digraph_node<SS> *cur_subseq,
node_commute->get_c()->tasks.push_back(&current_task);
node_commute->get_c()->tasks_id.push_back(taid++);
node_commute->get_c()->type = subseq_t::COMMUTE;
node_commute->get_c()->id = ssid++; // this sub-sequence indexing is wrong, it is fixed later in _init()
ssid++;

cur_subseq->add_child(node_commute);

Expand All @@ -901,8 +901,7 @@ ::init_recursive(tools::Digraph_node<SS> *cur_subseq,
node_commute->get_depth() +1);

node_commute_son->set_contents(new SS());
node_commute_son->get_c()->id = ssid++; // this sub-sequence indexing is wrong, it is fixed later in
// _init()
ssid++;

node_commute->add_child(node_commute_son);

Expand Down Expand Up @@ -1003,15 +1002,14 @@ ::init_recursive(tools::Digraph_node<SS> *cur_subseq,
node_selector->get_c()->tasks.push_back(&current_task);
node_selector->get_c()->tasks_id.push_back(taid++);
node_selector->get_c()->type = subseq_t::SELECT;
node_selector->get_c()->id = ssid++; // this sub-sequence indexing is wrong, it is fixed later in _init()
ssid++;

cur_subseq->add_child(node_selector);

auto node_selector_son = new tools::Digraph_node<SS>({node_selector}, {}, nullptr, node_selector->get_depth() +1);

node_selector_son->set_contents(new SS());
node_selector_son->get_c()->id = ssid++; // this sub-sequence indexing is wrong, it is fixed later in
// _init()
ssid++;

node_selector->add_child(node_selector_son);

Expand Down

0 comments on commit 34c8d24

Please sign in to comment.