[Beignet] [PATCH 2/2] test scalar global constants
Homer Hsing
homer.xing at intel.com
Wed Jul 3 19:45:42 PDT 2013
a test case was updated, to test not only constant arrays,
but also constant scalar.
Signed-off-by: Homer Hsing <homer.xing at intel.com>
---
kernels/compiler_global_constant.cl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernels/compiler_global_constant.cl b/kernels/compiler_global_constant.cl
index af3c7b1..5e2e0b4 100644
--- a/kernels/compiler_global_constant.cl
+++ b/kernels/compiler_global_constant.cl
@@ -1,8 +1,9 @@
constant int m[3] = {71,72,73};
+constant int n = 1;
__kernel void
compiler_global_constant(__global int *dst, int e, int r)
{
int id = (int)get_global_id(0);
- dst[id] = m[id%3] + e + r;
+ dst[id] = m[id%3] * n + e + r;
}
--
1.8.1.2
More information about the Beignet
mailing list