[Avida-SVN] r2532 - in branches/jobScheduling/source: cpu main
beckma24 at myxo.css.msu.edu
beckma24 at myxo.css.msu.edu
Fri Apr 11 13:22:47 PDT 2008
Author: beckma24
Date: 2008-04-11 16:22:47 -0400 (Fri, 11 Apr 2008)
New Revision: 2532
Modified:
branches/jobScheduling/source/cpu/cHardwareCPU.cc
branches/jobScheduling/source/main/cDeme.cc
Log:
Modified: branches/jobScheduling/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/jobScheduling/source/cpu/cHardwareCPU.cc 2008-04-11 15:18:51 UTC (rev 2531)
+++ branches/jobScheduling/source/cpu/cHardwareCPU.cc 2008-04-11 20:22:47 UTC (rev 2532)
@@ -3946,9 +3946,8 @@
const int reg_used = FindModifiedRegister(REG_BX);
for(int i = 0; i < organism->GetNeighborhoodSize(); i++) {
- if(organism->IsNeighborCellOccupied()) // continue to rotate
- continue;
- else {
+ if(!organism->IsNeighborCellOccupied()) // continue to rotate
+ {
GetRegister(reg_used) = 1;
return true;
}
@@ -3965,8 +3964,6 @@
if(organism->IsNeighborCellOccupied()) { // continue to rotate
GetRegister(reg_used) = 1;
return true;
- } else {
- continue;
}
organism->Rotate(1);
}
Modified: branches/jobScheduling/source/main/cDeme.cc
===================================================================
--- branches/jobScheduling/source/main/cDeme.cc 2008-04-11 15:18:51 UTC (rev 2531)
+++ branches/jobScheduling/source/main/cDeme.cc 2008-04-11 20:22:47 UTC (rev 2532)
@@ -161,6 +161,7 @@
cur_normalized_time_used = 0;
eventsKilled = 0;
eventsKilledThisSlot = 0;
+ consecutiveSuccessfulEventPeriods = 0;
if(resetResources)
deme_resource_count.ReinitializeResources(additional_resource);
@@ -412,6 +413,6 @@
}
iter++;
}
- assert(false); // slots must be of equal size and fit perfectally in deme lifetime
+// assert(false); // slots must be of equal size and fit perfectally in deme lifetime
return 0;
}
More information about the Avida-cvs
mailing list