summaryrefslogtreecommitdiff
path: root/kernels
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2014-11-07 16:21:05 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-11-07 16:03:51 +0800
commit084a9f301c3ccdc8f278c69e8d5e652d17a1a840 (patch)
tree1b15296d8dc8a6ffff12e20da23cb83ec3a74678 /kernels
parent99e3b583f0d5837601670ca3486cb5ecfd8bf1a1 (diff)
add test for cl buffer created with CL_MEM_USE_HOST_PTR
Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'kernels')
-rw-r--r--kernels/runtime_use_host_ptr_buffer.cl6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernels/runtime_use_host_ptr_buffer.cl b/kernels/runtime_use_host_ptr_buffer.cl
new file mode 100644
index 00000000..dbaadf87
--- /dev/null
+++ b/kernels/runtime_use_host_ptr_buffer.cl
@@ -0,0 +1,6 @@
+__kernel void
+runtime_use_host_ptr_buffer(__global int* buf)
+{
+ int id = (int)get_global_id(0);
+ buf[id] = buf[id] / 2;
+}