[Beignet] [PATCH v2 2/2] test const-indexed global constant array

Homer Hsing homer.xing at intel.com
Mon Jul 8 00:50:40 PDT 2013


A test case is updated, to test three feature:
  variable-indexed global constant array
  const-indexed global constant array
  global 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 5e2e0b4..5db58d6 100644
--- a/kernels/compiler_global_constant.cl
+++ b/kernels/compiler_global_constant.cl
@@ -1,9 +1,10 @@
 constant int m[3] = {71,72,73};
 constant int n = 1;
+constant int o[3] = {1, 1, 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] * n + e + r;
+  dst[id] = m[id%3] * n * o[2] + e + r;
 }
-- 
1.8.1.2



More information about the Beignet mailing list