[Avida-SVN] r1594 - in branches/collect: Avida.xcodeproj source/main source/platform
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Tue May 22 16:37:39 PDT 2007
Author: brysonda
Date: 2007-05-22 19:37:39 -0400 (Tue, 22 May 2007)
New Revision: 1594
Added:
branches/collect/source/platform/FloatingPoint.h
Modified:
branches/collect/Avida.xcodeproj/project.pbxproj
branches/collect/source/main/cPhenotype.h
Log:
Add missing FloatingPoint.h. Fix typo in cPhenotype.h.
Modified: branches/collect/Avida.xcodeproj/project.pbxproj
===================================================================
--- branches/collect/Avida.xcodeproj/project.pbxproj 2007-05-22 19:14:04 UTC (rev 1593)
+++ branches/collect/Avida.xcodeproj/project.pbxproj 2007-05-22 23:37:39 UTC (rev 1594)
@@ -926,7 +926,7 @@
DCC315CE076253A5008F7A48 /* environment.rotate */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = environment.rotate; sourceTree = "<group>"; };
DCC315D0076253A5008F7A48 /* task_event_gen.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = task_event_gen.cc; sourceTree = "<group>"; };
DCC315D1076253A5008F7A48 /* task_event_gen.old.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = task_event_gen.old.cc; sourceTree = "<group>"; };
- DCC3164D07626CF3008F7A48 /* avida */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = avida; sourceTree = BUILT_PRODUCTS_DIR; };
+ DCC3164D07626CF3008F7A48 /* avida */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = avida; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
Modified: branches/collect/source/main/cPhenotype.h
===================================================================
--- branches/collect/source/main/cPhenotype.h 2007-05-22 19:14:04 UTC (rev 1593)
+++ branches/collect/source/main/cPhenotype.h 2007-05-22 23:37:39 UTC (rev 1594)
@@ -277,7 +277,7 @@
const tArray<int>& GetLastTaskCount() const { assert(initialized == true); return last_task_count; }
const tArray<int>& GetLastInternalTaskCount() const { assert(initialized == true); return last_internal_task_count; }
const tArray<double>& GetLastTaskQuality() const { assert(initialized == true); return last_task_quality; }
- const tArray<double>& GetLastTaskValue() const { assert(intialized == true); return last_task_value; }
+ const tArray<double>& GetLastTaskValue() const { assert(initialized == true); return last_task_value; }
const tArray<double>& GetLastInternalTaskQuality() const { assert(initialized == true); return last_internal_task_quality; }
const tArray<double>& GetLastRBinsTotal() const { assert(initialized == true); return last_rbins_total; }
const tArray<double>& GetLastRBinsAvail() const { assert(initialized == true); return last_rbins_avail; }
Copied: branches/collect/source/platform/FloatingPoint.h (from rev 1593, development/source/platform/FloatingPoint.h)
===================================================================
--- branches/collect/source/platform/FloatingPoint.h (rev 0)
+++ branches/collect/source/platform/FloatingPoint.h 2007-05-22 23:37:39 UTC (rev 1594)
@@ -0,0 +1,35 @@
+/*
+ * FloatingPoint.h
+ * Avida
+ *
+ * Created by David on 5/20/07.
+ * Copyright 2007 Michigan State University. All rights reserved.
+ *
+ */
+
+#ifndef FloatingPoint_h
+#define FloatingPoint_h
+
+#if !defined(__APPLE__) && (defined(__i386__) || defined(i386) || defined(_M_IX86) || defined(_X86_) || defined(__THW_INTEL))
+# define FPE_X86 1
+#endif
+
+#ifdef FPE_X86
+void set_fpu (unsigned int mode)
+{
+#ifdef WIN32
+ __asm fldcw mode;
+#else
+ asm("fldcw %0" : : "m" (*&mode));
+#endif
+}
+#endif
+
+inline void SetupFloatingPointEnvironment()
+{
+#ifdef FPE_X86
+ set_fpu(0x27F); // Set the global rounding mode to double-precision
+#endif
+}
+
+#endif
More information about the Avida-cvs
mailing list