summaryrefslogtreecommitdiff
path: root/kernels
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2013-09-11 15:22:04 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-09-17 16:23:24 +0800
commitc705a8f73787626ed810f52aa56e4798a84db6cf (patch)
tree62cc725de718e88a509a2654296283aca2459077 /kernels
parentfd98654b20589eb942fe834fd735431a46f17b0e (diff)
change constant test case to cover short/long type.
Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels')
-rw-r--r--kernels/compiler_global_constant_2.cl13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernels/compiler_global_constant_2.cl b/kernels/compiler_global_constant_2.cl
index 353ebd7c..04536c7b 100644
--- a/kernels/compiler_global_constant_2.cl
+++ b/kernels/compiler_global_constant_2.cl
@@ -1,5 +1,9 @@
constant int m[3] = {0x15b,0x25b,0x35b};
-constant int t[5] = {0x45b,0x55b,0x65b,0x75b,0x85b};
+constant short t[5] = {0x45b,0x55b,0x65b,0x75b,0x85b};
+constant long n[3] = {0x15b,0x25b,0xFFFFFFFFF};
+constant long p[3] = {1,1,1};
+constant long s = 1;
+
__kernel void
compiler_global_constant_2(__global int *dst, int e, int r)
@@ -7,3 +11,10 @@ compiler_global_constant_2(__global int *dst, int e, int r)
int id = (int)get_global_id(0);
dst[id] = m[id%3] + t[id%5] + e + r;
}
+
+__kernel void
+compiler_global_constant_2_long(__global long *dst, int e, int r)
+{
+ int id = (int)get_global_id(0);
+ dst[id] = n[id%3]*p[1] + e*s + r;
+}