Commit b1e9d5bb authored by David G Andersen's avatar David G Andersen
Browse files

Fixed stupid bug where I was infinitely looping..

parent 283000a2
......@@ -122,7 +122,7 @@ float score()
int maxnodes = topo->switches[i]->numnodes();
int j = 0;
while (numdelays > 0 && j < maxnodes) {
if (topo->switches[i]->nodes[j].used) { continue; }
if (topo->switches[i]->nodes[j].used) { j++; continue; }
numdelays -= topo->switches[i]->nodes[j].ints/2;
topo->switches[i]->nodes[j].used = 1;
j++;
......@@ -206,7 +206,7 @@ void violated()
int maxnodes = topo->switches[i]->numnodes();
int j = 0;
while (numdelays > 0 && j < maxnodes) {
if (topo->switches[i]->nodes[j].used) { continue; }
if (topo->switches[i]->nodes[j].used) { j++; continue; }
numdelays -= topo->switches[i]->nodes[j].ints/2;
topo->switches[i]->nodes[j].used = 1;
j++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment