changeset 789:7a65c5b79aca

gix on gcc4.1 FillMissing, seam broken on gcc 4.3
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Fri, 10 Jul 2009 11:31:32 -0400
parents 627c7cc7f1f6
children d98117100166
files pylearn/sandbox/scan_inputs_groups.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/sandbox/scan_inputs_groups.py	Tue Jun 30 12:02:11 2009 -0400
+++ b/pylearn/sandbox/scan_inputs_groups.py	Fri Jul 10 11:31:32 2009 -0400
@@ -659,8 +659,11 @@
 
 #def c():
     def c_no_compile_args(self):
-#-ffast-math and "-ffinite-math-only" SHOULD NOT BE ACTIVATED as they make isnan don't work!
-        return ["-ffast-math", "-ffinite-math-only"]
+#-ffast-math and "-ffinite-math-only" SHOULD NOT BE ACTIVATED as they make isnan don't work! Idem for -funsafe-math-optimizations on gcc 4.1(on gcc 4.3 it don't break isnan)
+        return ["-ffast-math", "-ffinite-math-only",
+#for gcc 4.1 we also need '-funsafe-math-optimizations', not need for gcc 4.3. TODO find a way to return the value depending of the compiler used?
+                "-funsafe-math-optimizations"
+                ]
 
     def c_headers(self):
         return ['"Python.h"', '"numpy/noprefix.h"', '<math.h>']
@@ -699,6 +702,7 @@
         else: raise Exception("Type %s not implemented "%node.inputs[0].type.dtype)
                               
         return """
+//This space was added to for the recompilation as we changed the compiler option.
 int typenum;
 PyArrayObject* input = %(input)s, *value = %(value)s, *mask = %(mask)s;
 %(type)s fill_with[%(self.fill_with_length)s] = {%(self.fill_with_data)s};