summaryrefslogtreecommitdiff
path: root/kernels/builtin_global_id.cl
diff options
context:
space:
mode:
authorYi Sun <yi.sun@intel.com>2013-07-22 15:59:42 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-07-22 17:45:43 +0800
commit54d31547b9e4ce10e58a6e116ee33b5aba7b4ab8 (patch)
tree7f77dcccb0884f74964aa8f38b5e53714c02ed67 /kernels/builtin_global_id.cl
parent75b59f27c0bf403e97925e32b407b4fcb9bcb73f (diff)
utest: add built-in test case for get_global_id.
v2. Remove the useless argument in kernel. Signed-off-by: Yi Sun <yi.sun@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels/builtin_global_id.cl')
-rw-r--r--kernels/builtin_global_id.cl4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernels/builtin_global_id.cl b/kernels/builtin_global_id.cl
new file mode 100644
index 00000000..5b82f9f1
--- /dev/null
+++ b/kernels/builtin_global_id.cl
@@ -0,0 +1,4 @@
+kernel void builtin_global_id( __global int *ret) {
+ int id = get_global_id(0) + get_global_id(1)*3 + get_global_id(2)*3*4;
+ ret[id] = id;
+}