[libclc] 32/291: r600: Add get_global_size() implementation

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:29 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 760192413b4fd5f67d14a79c5c74d7f6fcea354c
Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Wed Jun 26 18:19:44 2013 +0000

    r600: Add get_global_size() implementation
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@184977 91177308-0d34-0410-b5e6-96231b3b80d8
---
 r600/include/clc/workitem/get_global_size.h |  4 +---
 r600/lib/SOURCES                            |  1 +
 r600/lib/workitem/get_global_size.cl        | 10 ++++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/r600/include/clc/workitem/get_global_size.h b/r600/include/clc/workitem/get_global_size.h
index afd9ae1..8d7b9a1 100644
--- a/r600/include/clc/workitem/get_global_size.h
+++ b/r600/include/clc/workitem/get_global_size.h
@@ -1,3 +1 @@
-_CLC_INLINE size_t get_global_size(uint dim) {
-  return 0;
-}
+size_t get_global_size(uint dim);
diff --git a/r600/lib/SOURCES b/r600/lib/SOURCES
index 0844030..644d2f3 100644
--- a/r600/lib/SOURCES
+++ b/r600/lib/SOURCES
@@ -1 +1,2 @@
 workitem/get_global_id.cl
+workitem/get_global_size.cl
diff --git a/r600/lib/workitem/get_global_size.cl b/r600/lib/workitem/get_global_size.cl
new file mode 100644
index 0000000..4e47bbe
--- /dev/null
+++ b/r600/lib/workitem/get_global_size.cl
@@ -0,0 +1,10 @@
+#include <clc/clc.h>
+
+_CLC_DEF size_t get_global_size(uint dim) {
+  switch (dim) {
+  case 0: return __builtin_r600_read_global_size_x();
+  case 1: return __builtin_r600_read_global_size_y();
+  case 2: return __builtin_r600_read_global_size_z();
+  default: return 1;
+  }
+}

-- 
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