Update topological_sort.cc
This commit is contained in:
parent
0c47b7b33e
commit
603104ecf5
@ -81,8 +81,8 @@ Status ComputeTopologicalOrder(
|
||||
int ready_node = (*ready_nodes)[front];
|
||||
for (int fanout : graph_view.GetFanout(ready_node)) {
|
||||
++num_ready_inputs[fanout];
|
||||
const int graph_view_get_fanin_fanout_size = graph_view.GetFanin(fanout).size();
|
||||
if (num_ready_inputs[fanout] == graph_view_get_fanin_fanout_size) {
|
||||
const int max_size = graph_view.GetFanin(fanout).size();
|
||||
if (num_ready_inputs[fanout] == max_size) {
|
||||
ready_nodes->push_back(fanout);
|
||||
++back;
|
||||
}
|
||||
@ -96,8 +96,8 @@ Status ComputeTopologicalOrder(
|
||||
"at node = "
|
||||
<< graph.node(back).DebugString();
|
||||
for (int i = 0; i < graph_view.num_nodes(); ++i) {
|
||||
const int graph_view_Get_fanin_i_size = graph_view.GetFanin(i).size();
|
||||
if (num_ready_inputs[i] != graph_view_Get_fanin_i_size) {
|
||||
const int max_size = graph_view.GetFanin(i).size();
|
||||
if (num_ready_inputs[i] != max_size) {
|
||||
VLOG(1) << "Node not ready: " << graph.node(i).DebugString();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user