[libclc] 212/291: Implement wait_group_events builtin v2

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit 067738708334d1f9082cffaec93cc9df836179eb
Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Fri Oct 3 19:49:34 2014 +0000

    Implement wait_group_events builtin v2
    
    This is a simple default implemetation which just calls barrier().
    
    v2:
      - Only call barrier() once.
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@219006 91177308-0d34-0410-b5e6-96231b3b80d8
---
 generic/include/clc/async/wait_group_events.h | 1 +
 generic/include/clc/clc.h                     | 1 +
 generic/lib/SOURCES                           | 1 +
 generic/lib/async/wait_group_events.cl        | 5 +++++
 4 files changed, 8 insertions(+)

diff --git a/generic/include/clc/async/wait_group_events.h b/generic/include/clc/async/wait_group_events.h
new file mode 100644
index 0000000..799efa0
--- /dev/null
+++ b/generic/include/clc/async/wait_group_events.h
@@ -0,0 +1 @@
+void wait_group_events(int num_events, event_t *event_list);
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index 972255b..53f5b28 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -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>
diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
index dad283a..1752211 100644
--- a/generic/lib/SOURCES
+++ b/generic/lib/SOURCES
@@ -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
diff --git a/generic/lib/async/wait_group_events.cl b/generic/lib/async/wait_group_events.cl
new file mode 100644
index 0000000..05c9d58
--- /dev/null
+++ b/generic/lib/async/wait_group_events.cl
@@ -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);
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list