diff options
author | Yi Sun <yi.sun@intel.com> | 2013-07-29 23:19:53 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-07-30 12:01:50 +0800 |
commit | 0db582d142e6c2243add577264558dddce35720a (patch) | |
tree | 5b4b438501219d50e1c6b4f2fc21154ab588e40b /kernels/builtin_local_id.cl | |
parent | 534f2ce3af6310eac103a9663ff05ef44c448d1b (diff) |
utest: Add test for built-in function get_local_id.
Signed-off-by: Yi Sun <yi.sun@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'kernels/builtin_local_id.cl')
-rw-r--r-- | kernels/builtin_local_id.cl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernels/builtin_local_id.cl b/kernels/builtin_local_id.cl new file mode 100644 index 00000000..489833da --- /dev/null +++ b/kernels/builtin_local_id.cl @@ -0,0 +1,6 @@ +kernel void builtin_local_id( __global int *ret) { + int id = get_local_id(0) + get_group_id(0) * 2 + \ + get_local_id(1) * 4 + get_group_id(1) * 12 +\ + get_local_id(2) * 36 + get_group_id(2) * 144; + ret[id] = id; +} |