[DirectX] Implement the resource.store.rawbuffer intrinsic (#121282)
[llvm-project.git] / libclc / ptx-nvidiacl / lib / workitem / get_group_id.cl
blobbbbf1068e69ea0f75ba38f90835e4e624e61ee06
1 #include <clc/clc.h>
3 _CLC_DEF _CLC_OVERLOAD size_t get_group_id(uint dim) {
4 switch (dim) {
5 case 0: return __nvvm_read_ptx_sreg_ctaid_x();
6 case 1: return __nvvm_read_ptx_sreg_ctaid_y();
7 case 2: return __nvvm_read_ptx_sreg_ctaid_z();
8 default: return 0;