summaryrefslogtreecommitdiff
path: root/kernels/builtin_global_linear_id.cl
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/builtin_global_linear_id.cl')
-rw-r--r--kernels/builtin_global_linear_id.cl4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernels/builtin_global_linear_id.cl b/kernels/builtin_global_linear_id.cl
new file mode 100644
index 00000000..6810ffd6
--- /dev/null
+++ b/kernels/builtin_global_linear_id.cl
@@ -0,0 +1,4 @@
+kernel void builtin_global_linear_id( __global int *ret) {
+ int id = get_global_linear_id();
+ ret[id] = id;
+}