SPAWNW should pick never-before-spawned warps, not merely idle (possibly at a barrier) ones.

This commit is contained in:
cdkersey
2015-08-04 14:58:59 -06:00
parent e77e43aecb
commit 8474581c5a
3 changed files with 6 additions and 3 deletions

View File

@@ -349,11 +349,12 @@ void Instruction::executeOn(Warp &c) {
D(0, "Spawning a new warp.");
for (unsigned i = 0; i < c.core->w.size(); ++i) {
Warp &newWarp(c.core->w[i]);
if (newWarp.activeThreads == 0) {
if (newWarp.spawned == false) {
newWarp.pc = reg[rsrc[0]];
newWarp.reg[0][rdest] = reg[rsrc[1]];
newWarp.activeThreads = 1;
newWarp.supervisorMode = false;
newWarp.spawned = true;
break;
}
}