hi guys.im a programmer as hobby. good project. i look forward to finished.  i 
has a ivb-gt2 laptop.

i believe that keeping source code with python 3.x will be better.

So i submit a patch.i tested it. it was compiled. Then it was run succesfully.

the patch file attached.  best WORKS!

         
diff -rupN backend/src/gen_builtin_vector.py backen/src/gen_builtin_vector.py
--- backend/src/gen_builtin_vector.py	2013-12-16 14:22:55.085312454 +0200
+++ backend/src/gen_builtin_vector.py	2013-12-16 02:36:34.000000000 +0200
@@ -25,8 +25,8 @@ import sys
 import os
 
 if len(sys.argv) != 3:
-    print "Invalid argument {}".format(sys.argv)
-    print "use {} spec_file_name output_file_name".format(sys.argv[0])
+    print ("Invalid argument {}".format(sys.argv))
+    print ("use {} spec_file_name output_file_name".format(sys.argv[0]))
     raise
 
 all_vector = 1,2,3,4,8,16
@@ -61,8 +61,8 @@ all_type = all_int_type + all_float_type
 
 # all vector/scalar types
 for t in all_type:
-    exec "{0}n = [\"{0}n\", gen_vector_type([\"{0}\"])]".format(t)
-    exec "s{0} = [\"{0}\", gen_vector_type([\"{0}\"], [1])]".format(t)
+    exec ("{0}n = [\"{0}n\", gen_vector_type([\"{0}\"])]".format(t))
+    exec ("s{0} = [\"{0}\", gen_vector_type([\"{0}\"], [1])]".format(t))
 
 # Predefined type sets according to the Open CL spec.
 math_gentype = ["math_gentype", gen_vector_type(all_float_type)]
@@ -124,7 +124,7 @@ def check_type(types):
     for t in types:
         memspace, t = stripMemSpace(t)
         if not t in type_dict:
-            print t
+            print (t)
             raise "found invalid type."
 
 def match_unsigned(dtype):
@@ -187,7 +187,7 @@ def fixup_type(dstType, srcType, n):
         if (len(dstType) == len(srcType)):
             return dstType[n]
 
-    print dstType, srcType
+    print (dstType, srcType)
     raise "type mispatch"
 
 class builtinProto():
@@ -224,7 +224,7 @@ class builtinProto():
 
     def init_from_line(self, t):
         self.append('//{}'.format(t))
-        line = filter(None, re.split(',| |\(', t.rstrip(')\n')))
+        line = list(filter(None, re.split(',| |\(', t.rstrip(')\n'))))
         self.paramCount = 0
         stripped = 0
         memSpace = ''
@@ -325,7 +325,7 @@ class builtinProto():
 
     def output(self):
         for line in self.outputStr:
-            print line
+            print (line)
 
     def output(self, outFile):
         for line in self.outputStr:
diff -rupN backend/src/update_blob_ocl_header.py backen/src/update_blob_ocl_header.py
--- backend/src/update_blob_ocl_header.py	2013-12-16 14:22:55.028645785 +0200
+++ backend/src/update_blob_ocl_header.py	2013-12-16 02:29:46.000000000 +0200
@@ -21,8 +21,8 @@ import sys
 import os
 
 if len(sys.argv) != 3:
-    print "Invalid argument {}".format(sys.argv)
-    print "use {} tmpl_file_name output_file_name".format(sys.argv[0])
+    print ("Invalid argument {}".format(sys.argv))
+    print ("use {} tmpl_file_name output_file_name".format(sys.argv[0]))
     raise
 
 def safeUnlink(filename):
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to