summaryrefslogtreecommitdiff
path: root/utests/utest_generator.py
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2016-07-18 09:04:16 +0800
committerYang Rong <rong.r.yang@intel.com>2016-07-20 17:35:39 +0800
commitf6799d14c0f46d35107469c22f091fc73f7b0633 (patch)
tree10bbdfef289472e41961c38fcb9a6286d5ad52b4 /utests/utest_generator.py
parent87b5058d8f54ea3fb047aee320ec2c8a8022b73f (diff)
downloadbeignet-f6799d14c0f46d35107469c22f091fc73f7b0633.tar.gz
do not use const pointer
Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/utest_generator.py')
-rw-r--r--utests/utest_generator.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/utests/utest_generator.py b/utests/utest_generator.py
index bcb9ac44..2c02ad6c 100644
--- a/utests/utest_generator.py
+++ b/utests/utest_generator.py
@@ -280,9 +280,9 @@ which can print more values and information to assist debuging the issue.
vals = vals[0:128]
break
vals += self.values[i]
- self.cpplines += [ "const %s input_data%d[] = {%s};" %(self.argtype(i,index),i+1,str(vals).strip('[]').replace('\'','')) ]
+ self.cpplines += [ "%s input_data%d[] = {%s};" %(self.argtype(i,index),i+1,str(vals).strip('[]').replace('\'','')) ]
self.cpplines += [ "const int count_input = sizeof(input_data1) / sizeof(input_data1[0]);" ]
- self.cpplines += [ "const int vector = %s;\n"%(vlen) ]
+ self.cpplines += [ "int vector = %s;\n"%(vlen) ]
#####Cpu Function
def GenCpuCompilerMath(self,index):
@@ -457,6 +457,8 @@ static void %s_%s(void)
#The head:
self.cpplines += [self.Head]
+ self.cpplines += ["namespace {\n"]
+
#Parameters:
self.GenInputValues(i)
@@ -469,6 +471,8 @@ static void %s_%s(void)
#utest function
self.utestFunc(i)
+ self.cpplines += ["}\n"]
+
#kernel cl
self.genCL(i)