diff options
Diffstat (limited to 'libclc/generic/lib/workitem/get_global_id.cl')
-rw-r--r-- | libclc/generic/lib/workitem/get_global_id.cl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libclc/generic/lib/workitem/get_global_id.cl b/libclc/generic/lib/workitem/get_global_id.cl new file mode 100644 index 0000000..fdd83d2 --- /dev/null +++ b/libclc/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); +} |