[libclc] r219006 - Implement wait_group_events builtin v2
Tom Stellard
thomas.stellard at amd.com
Fri Oct 3 12:49:34 PDT 2014
Author: tstellar
Date: Fri Oct 3 14:49:34 2014
New Revision: 219006
URL: http://llvm.org/viewvc/llvm-project?rev=219006&view=rev
Log:
Implement wait_group_events builtin v2
This is a simple default implemetation which just calls barrier().
v2:
- Only call barrier() once.
Added:
libclc/trunk/generic/include/clc/async/wait_group_events.h
libclc/trunk/generic/lib/async/wait_group_events.cl
Modified:
libclc/trunk/generic/include/clc/clc.h
libclc/trunk/generic/lib/SOURCES
Added: libclc/trunk/generic/include/clc/async/wait_group_events.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/async/wait_group_events.h?rev=219006&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/async/wait_group_events.h (added)
+++ libclc/trunk/generic/include/clc/async/wait_group_events.h Fri Oct 3 14:49:34 2014
@@ -0,0 +1 @@
+void wait_group_events(int num_events, event_t *event_list);
Modified: libclc/trunk/generic/include/clc/clc.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/clc.h?rev=219006&r1=219005&r2=219006&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Fri Oct 3 14:49:34 2014
@@ -138,6 +138,7 @@
/* 6.11.10 Async Copy and Prefetch Functions */
#include <clc/async/prefetch.h>
+#include <clc/async/wait_group_events.h>
/* 6.11.11 Atomic Functions */
#include <clc/atomic/atomic_add.h>
Modified: libclc/trunk/generic/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/SOURCES?rev=219006&r1=219005&r2=219006&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Fri Oct 3 14:49:34 2014
@@ -1,4 +1,5 @@
async/prefetch.cl
+async/wait_group_events.cl
atomic/atomic_xchg.cl
atomic/atomic_impl.ll
cl_khr_global_int32_base_atomics/atom_add.cl
Added: libclc/trunk/generic/lib/async/wait_group_events.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/async/wait_group_events.cl?rev=219006&view=auto
==============================================================================
--- libclc/trunk/generic/lib/async/wait_group_events.cl (added)
+++ libclc/trunk/generic/lib/async/wait_group_events.cl Fri Oct 3 14:49:34 2014
@@ -0,0 +1,5 @@
+#include <clc/clc.h>
+
+_CLC_DEF void wait_group_events(int num_events, event_t *event_list) {
+ barrier(CLK_LOCAL_MEM_FENCE | CLK_GLOBAL_MEM_FENCE);
+}
More information about the cfe-commits
mailing list