[Avida-SVN] [avida-svn] r1033 - in development/source: cpu tools

baerb at myxo.css.msu.edu baerb at myxo.css.msu.edu
Tue Oct 10 07:30:30 PDT 2006


Author: baerb
Date: 2006-10-10 10:30:30 -0400 (Tue, 10 Oct 2006)
New Revision: 1033

Modified:
   development/source/cpu/cHardwareCPU.cc
   development/source/tools/cMerit.h
Log:

The Pathscale compiler on the MSU HPC cluster has problems with log function
using integer valse and the pow function using unsigned integers as exponents.
Modified the code to accomidate this.
 


Modified: development/source/cpu/cHardwareCPU.cc
===================================================================
--- development/source/cpu/cHardwareCPU.cc	2006-10-10 00:27:00 UTC (rev 1032)
+++ development/source/cpu/cHardwareCPU.cc	2006-10-10 14:30:30 UTC (rev 1033)
@@ -2744,7 +2744,7 @@
  
   if ((last_num_resources != res_count.GetSize()))
   {
-      int max_label_length = (int) ceil(log(res_count.GetSize())/log(cHardwareCPU::NUM_NOPS));
+      int max_label_length = (int) ceil(log((float) res_count.GetSize())/log((float) cHardwareCPU::NUM_NOPS));
       last_num_resources = res_count.GetSize();
   }
 

Modified: development/source/tools/cMerit.h
===================================================================
--- development/source/tools/cMerit.h	2006-10-10 00:27:00 UTC (rev 1032)
+++ development/source/tools/cMerit.h	2006-10-10 14:30:30 UTC (rev 1033)
@@ -21,7 +21,7 @@
 protected:
   int bits;
   unsigned int base;
-  unsigned int offset;
+  int offset;
   double value;
 
   void UpdateValue(double in_value);




More information about the Avida-cvs mailing list