[libclc] r184977 - r600: Add get_global_size() implementation
Tom Stellard
thomas.stellard at amd.com
Wed Jun 26 11:19:44 PDT 2013
Author: tstellar
Date: Wed Jun 26 13:19:44 2013
New Revision: 184977
URL: http://llvm.org/viewvc/llvm-project?rev=184977&view=rev
Log:
r600: Add get_global_size() implementation
Added:
libclc/trunk/r600/lib/workitem/get_global_size.cl
Modified:
libclc/trunk/r600/include/clc/workitem/get_global_size.h
libclc/trunk/r600/lib/SOURCES
Modified: libclc/trunk/r600/include/clc/workitem/get_global_size.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/r600/include/clc/workitem/get_global_size.h?rev=184977&r1=184976&r2=184977&view=diff
==============================================================================
--- libclc/trunk/r600/include/clc/workitem/get_global_size.h (original)
+++ libclc/trunk/r600/include/clc/workitem/get_global_size.h Wed Jun 26 13:19:44 2013
@@ -1,3 +1 @@
-_CLC_INLINE size_t get_global_size(uint dim) {
- return 0;
-}
+size_t get_global_size(uint dim);
Modified: libclc/trunk/r600/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/r600/lib/SOURCES?rev=184977&r1=184976&r2=184977&view=diff
==============================================================================
--- libclc/trunk/r600/lib/SOURCES (original)
+++ libclc/trunk/r600/lib/SOURCES Wed Jun 26 13:19:44 2013
@@ -1 +1,2 @@
workitem/get_global_id.cl
+workitem/get_global_size.cl
Added: libclc/trunk/r600/lib/workitem/get_global_size.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/r600/lib/workitem/get_global_size.cl?rev=184977&view=auto
==============================================================================
--- libclc/trunk/r600/lib/workitem/get_global_size.cl (added)
+++ libclc/trunk/r600/lib/workitem/get_global_size.cl Wed Jun 26 13:19:44 2013
@@ -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;
+ }
+}
More information about the cfe-commits
mailing list