Skip to content

Commit bf47880

Browse files
Xinyu LiXinyu Li
authored andcommitted
add node name
1 parent 72b3a8b commit bf47880

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/ion/port.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class Port {
210210
[&](const Port::Channel &c) { return std::get<0>(c) == nid; });
211211
}
212212

213-
void determine_succ(const NodeID &nid, const std::string &old_pn, const std::string &new_pn);
213+
void determine_succ(const std::string & n_name, const NodeID &nid, const std::string &old_pn, const std::string &new_pn);
214214

215215
/**
216216
* Overloaded operator to set the port index and return a reference to the current port. eg. port[0]

src/lower.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void determine_and_validate(std::vector<Node> &nodes) {
128128
throw std::runtime_error(msg);
129129
}
130130

131-
port.determine_succ(n.id(), pn, arginfo.name);
131+
port.determine_succ(n.name(), n.id(), pn, arginfo.name);
132132
pn = arginfo.name;
133133
}
134134

src/port.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Port::Impl::Impl(const NodeID &nid, const std::string &pn, const Halide::Type &t
1414
params[0] = Halide::Parameter(type, dimensions != 0, dimensions, argument_name(nid, id, pn, 0, gid));
1515
}
1616

17-
void Port::determine_succ(const NodeID &nid, const std::string &old_pn, const std::string &new_pn) {
17+
void Port::determine_succ(const std::string & n_name,const NodeID &nid, const std::string &old_pn, const std::string &new_pn) {
1818
auto it = std::find(impl_->succ_chans.begin(), impl_->succ_chans.end(), Channel{nid, old_pn});
1919
if (it == impl_->succ_chans.end()) {
2020
log::error("fixme");
2121
throw std::runtime_error("fixme");
2222
}
2323

24-
log::debug("Determine free port {} as {} on Node {}", old_pn, new_pn, nid.value());
24+
log::debug("Determine free port {} as {} on Node: {}_{}", old_pn, new_pn, n_name, nid.value());
2525
impl_->succ_chans.erase(it);
2626
impl_->succ_chans.insert(Channel{nid, new_pn});
2727
}

0 commit comments

Comments
 (0)