test OpenCL 1.1 Async Copies and Prefetch Functions
authorHomer Hsing <homer.xing@intel.com>
Thu, 29 Nov 2012 01:40:50 +0000 (09:40 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 29 Mar 2013 10:41:33 +0000 (18:41 +0800)
kernels/compiler_async_copy_and_prefetch.cl [new file with mode: 0644]
utests/compiler_async_copy_and_prefetch.cpp [new file with mode: 0644]

diff --git a/kernels/compiler_async_copy_and_prefetch.cl b/kernels/compiler_async_copy_and_prefetch.cl
new file mode 100644 (file)
index 0000000..7489bb0
--- /dev/null
@@ -0,0 +1,9 @@
+/* test OpenCL 1.1 Async Copies and Prefetch Functions (section 6.11.10) */
+kernel void compiler_async_copy_and_prefetch(__global float *p) {
+  prefetch(p, 10);
+  local float l[10];
+  event_t e[2];
+  async_work_group_copy(l, p, 10, 0);
+  async_work_group_copy(p, l, 10, 0);
+  wait_group_events(2, e);
+}
diff --git a/utests/compiler_async_copy_and_prefetch.cpp b/utests/compiler_async_copy_and_prefetch.cpp
new file mode 100644 (file)
index 0000000..323faf9
--- /dev/null
@@ -0,0 +1,10 @@
+#include "utest_helper.hpp"
+
+void compiler_async_copy_and_prefetch(void)
+{
+  OCL_CREATE_KERNEL("compiler_async_copy_and_prefetch");
+}
+
+MAKE_UTEST_FROM_FUNCTION(compiler_async_copy_and_prefetch);
+
+