summaryrefslogtreecommitdiff
path: root/generic/lib/workitem/get_global_id.cl
diff options
context:
space:
mode:
Diffstat (limited to 'generic/lib/workitem/get_global_id.cl')
-rw-r--r--generic/lib/workitem/get_global_id.cl5
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/lib/workitem/get_global_id.cl b/generic/lib/workitem/get_global_id.cl
new file mode 100644
index 0000000..fdd83d2
--- /dev/null
+++ b/generic/lib/workitem/get_global_id.cl
@@ -0,0 +1,5 @@
+#include <clc/clc.h>
+
+_CLC_DEF size_t get_global_id(uint dim) {
+ return get_group_id(dim)*get_local_size(dim) + get_local_id(dim);
+}