diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-11-26 16:51:12 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-12-01 15:52:07 +0800 |
commit | 355be0cba0d40cf00ff65d471d8771e763d06394 (patch) | |
tree | 6be9872274985071cc409ad45874100aa3378acb /kernels | |
parent | 25e4e0e90554ab87df0cfc4eccb3b2df6b0c4026 (diff) |
utests: Add one case to test negative index array access.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
Diffstat (limited to 'kernels')
-rw-r--r-- | kernels/compiler_array4.cl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernels/compiler_array4.cl b/kernels/compiler_array4.cl new file mode 100644 index 00000000..6ddc9732 --- /dev/null +++ b/kernels/compiler_array4.cl @@ -0,0 +1,9 @@ +__kernel void +compiler_array4(__global int4 *src4, __global int4 *dst4, int offset) +{ + int i; + int final[16]; + __global int *dst = (__global int *)(dst4 + offset + get_global_id(0)); + __global int *src = (__global int *)(src4 + offset + get_global_id(0)); + dst[-4] = src[-4]; +} |