summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libclc/generic/include/clc/async/async_work_group_copy.h15
-rw-r--r--libclc/generic/include/clc/async/async_work_group_copy.inc5
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/lib/SOURCES1
-rw-r--r--libclc/generic/lib/async/async_work_group_copy.cl9
-rw-r--r--libclc/generic/lib/async/async_work_group_copy.inc17
6 files changed, 48 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/async/async_work_group_copy.h b/libclc/generic/include/clc/async/async_work_group_copy.h
new file mode 100644
index 00000000000..39c637b0e26
--- /dev/null
+++ b/libclc/generic/include/clc/async/async_work_group_copy.h
@@ -0,0 +1,15 @@
+#define __CLC_DST_ADDR_SPACE local
+#define __CLC_SRC_ADDR_SPACE global
+#define __CLC_BODY <clc/async/async_work_group_copy.inc>
+#include <clc/async/gentype.inc>
+#undef __CLC_DST_ADDR_SPACE
+#undef __CLC_SRC_ADDR_SPACE
+#undef __CLC_BODY
+
+#define __CLC_DST_ADDR_SPACE global
+#define __CLC_SRC_ADDR_SPACE local
+#define __CLC_BODY <clc/async/async_work_group_copy.inc>
+#include <clc/async/gentype.inc>
+#undef __CLC_DST_ADDR_SPACE
+#undef __CLC_SRC_ADDR_SPACE
+#undef __CLC_BODY
diff --git a/libclc/generic/include/clc/async/async_work_group_copy.inc b/libclc/generic/include/clc/async/async_work_group_copy.inc
new file mode 100644
index 00000000000..d85df6c8fad
--- /dev/null
+++ b/libclc/generic/include/clc/async/async_work_group_copy.inc
@@ -0,0 +1,5 @@
+_CLC_OVERLOAD _CLC_DECL event_t async_work_group_copy(
+ __CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst,
+ const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src,
+ size_t num_gentypes,
+ event_t event);
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index 85bf0fa4286..2afbcfdaccd 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -137,6 +137,7 @@
#include <clc/synchronization/barrier.h>
/* 6.11.10 Async Copy and Prefetch Functions */
+#include <clc/async/async_work_group_copy.h>
#include <clc/async/async_work_group_strided_copy.h>
#include <clc/async/prefetch.h>
#include <clc/async/wait_group_events.h>
diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES
index 1dd3ff717c3..f7b3adf6329 100644
--- a/libclc/generic/lib/SOURCES
+++ b/libclc/generic/lib/SOURCES
@@ -1,3 +1,4 @@
+async/async_work_group_copy.cl
async/async_work_group_strided_copy.cl
async/prefetch.cl
async/wait_group_events.cl
diff --git a/libclc/generic/lib/async/async_work_group_copy.cl b/libclc/generic/lib/async/async_work_group_copy.cl
new file mode 100644
index 00000000000..fe20ecfd9bb
--- /dev/null
+++ b/libclc/generic/lib/async/async_work_group_copy.cl
@@ -0,0 +1,9 @@
+#include <clc/clc.h>
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif
+
+#define __CLC_BODY <async_work_group_copy.inc>
+#include <clc/async/gentype.inc>
+#undef __CLC_BODY
diff --git a/libclc/generic/lib/async/async_work_group_copy.inc b/libclc/generic/lib/async/async_work_group_copy.inc
new file mode 100644
index 00000000000..a143ddfb9f6
--- /dev/null
+++ b/libclc/generic/lib/async/async_work_group_copy.inc
@@ -0,0 +1,17 @@
+_CLC_OVERLOAD _CLC_DEF event_t async_work_group_copy(
+ local __CLC_GENTYPE *dst,
+ const global __CLC_GENTYPE *src,
+ size_t num_gentypes,
+ event_t event) {
+
+ return async_work_group_strided_copy(dst, src, num_gentypes, 1, event);
+}
+
+_CLC_OVERLOAD _CLC_DEF event_t async_work_group_copy(
+ global __CLC_GENTYPE *dst,
+ const local __CLC_GENTYPE *src,
+ size_t num_gentypes,
+ event_t event) {
+
+ return async_work_group_strided_copy(dst, src, num_gentypes, 1, event);
+}
OpenPOWER on IntegriCloud