[Offload] Fix offload-info interface
[llvm-project.git] / libclc / ptx-nvidiacl / lib / workitem / get_local_id.cl
bloba6770f2b9155709231e3d28c75c276f7de91699e
1 #include <clc/clc.h>
3 _CLC_DEF _CLC_OVERLOAD size_t get_local_id(uint dim) {
4 switch (dim) {
5 case 0: return __nvvm_read_ptx_sreg_tid_x();
6 case 1: return __nvvm_read_ptx_sreg_tid_y();
7 case 2: return __nvvm_read_ptx_sreg_tid_z();
8 default: return 0;