[Piglit] [PATCH] Replace CL kernel names to not use C++ reserved words.

Aaron Watry awatry at gmail.com
Sun Nov 25 19:36:42 PST 2012


These tests were failing to compile on Nvidia CL runtime on *NIX.
---
 tests/cl/program/execute/scalar-logical-float.cl |   24 +++++++++++-----------
 tests/cl/program/execute/scalar-logical-int.cl   |   24 +++++++++++-----------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/tests/cl/program/execute/scalar-logical-float.cl b/tests/cl/program/execute/scalar-logical-float.cl
index ae75bf4..43265d5 100644
--- a/tests/cl/program/execute/scalar-logical-float.cl
+++ b/tests/cl/program/execute/scalar-logical-float.cl
@@ -14,19 +14,19 @@ global_size: 1 0 0
 
 [test]
 name: !num
-kernel_name: not
+kernel_name: test_not
 arg_in:  1 float 1.5
 arg_out: 0 buffer int[1] 0
 
 [test]
 name: !0
-kernel_name: not
+kernel_name: test_not
 arg_in:  1 float 0
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: !inf
-kernel_name: not
+kernel_name: test_not
 arg_in:  1 float inf
 arg_out: 0 buffer int[1] 0
 
@@ -34,21 +34,21 @@ arg_out: 0 buffer int[1] 0
 
 [test]
 name: num&&-num
-kernel_name: and
+kernel_name: test_and
 arg_in:  1 float 34.25
 arg_in:  2 float -55.125
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: num&&0
-kernel_name: and
+kernel_name: test_and
 arg_in:  1 float 1.5
 arg_in:  2 float 0
 arg_out: 0 buffer int[1] 0
 
 [test]
 name: 0&&0
-kernel_name: and
+kernel_name: test_and
 arg_in:  1 float 0
 arg_in:  2 float 0
 arg_out: 0 buffer int[1] 0
@@ -57,35 +57,35 @@ arg_out: 0 buffer int[1] 0
 
 [test]
 name: num||-num
-kernel_name: or
+kernel_name: test_or
 arg_in:  1 float 14.3
 arg_in:  2 float -34.1
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: num||0
-kernel_name: or
+kernel_name: test_or
 arg_in:  1 float 45.3
 arg_in:  2 float 0
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: 0||0
-kernel_name: or
+kernel_name: test_or
 arg_in:  1 float 0
 arg_in:  2 float 0
 arg_out: 0 buffer int[1] 0
 
 !*/
 
-kernel void not(global int* out, float in) {
+kernel void test_not(global int* out, float in) {
 	out[0] = !in;
 }
 
-kernel void and(global int* out, float a, float b) {
+kernel void test_and(global int* out, float a, float b) {
 	out[0] = a && b;
 }
 
-kernel void or(global int* out, float a, float b) {
+kernel void test_or(global int* out, float a, float b) {
 	out[0] = a || b;
 }
diff --git a/tests/cl/program/execute/scalar-logical-int.cl b/tests/cl/program/execute/scalar-logical-int.cl
index f09eb0b..303bd5b 100644
--- a/tests/cl/program/execute/scalar-logical-int.cl
+++ b/tests/cl/program/execute/scalar-logical-int.cl
@@ -14,19 +14,19 @@ global_size: 1 0 0
 
 [test]
 name: !true
-kernel_name: not
+kernel_name: test_not
 arg_in:  1 int 1
 arg_out: 0 buffer int[1] 0
 
 [test]
 name: !false
-kernel_name: not
+kernel_name: test_not
 arg_in:  1 int 0
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: !big_num
-kernel_name: not
+kernel_name: test_not
 arg_in:  1 int 3452
 arg_out: 0 buffer int[1] 0
 
@@ -34,21 +34,21 @@ arg_out: 0 buffer int[1] 0
 
 [test]
 name: true&&true
-kernel_name: and
+kernel_name: test_and
 arg_in:  1 int 1
 arg_in:  2 int 1
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: true&&false
-kernel_name: and
+kernel_name: test_and
 arg_in:  1 int 1
 arg_in:  2 int 0
 arg_out: 0 buffer int[1] 0
 
 [test]
 name: false&&false
-kernel_name: and
+kernel_name: test_and
 arg_in:  1 int 0
 arg_in:  2 int 0
 arg_out: 0 buffer int[1] 0
@@ -57,35 +57,35 @@ arg_out: 0 buffer int[1] 0
 
 [test]
 name: true||true
-kernel_name: or
+kernel_name: test_or
 arg_in:  1 int 1
 arg_in:  2 int 1
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: true||false
-kernel_name: or
+kernel_name: test_or
 arg_in:  1 int 1
 arg_in:  2 int 0
 arg_out: 0 buffer int[1] 1
 
 [test]
 name: false||false
-kernel_name: or
+kernel_name: test_or
 arg_in:  1 int 0
 arg_in:  2 int 0
 arg_out: 0 buffer int[1] 0
 
 !*/
 
-kernel void not(global int* out, int in) {
+kernel void test_not(global int* out, int in) {
 	out[0] = !in;
 }
 
-kernel void and(global int* out, int a, int b) {
+kernel void test_and(global int* out, int a, int b) {
 	out[0] = a && b;
 }
 
-kernel void or(global int* out, int a, int b) {
+kernel void test_or(global int* out, int a, int b) {
 	out[0] = a || b;
 }
-- 
1.7.10.4



More information about the Piglit mailing list