[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / libclc / amdgcn / lib / workitem / get_global_size.cl
blob2f28ca6066654b59437f0646299ec525f2b991e5
1 #include <clc/clc.h>
3 uint __clc_amdgcn_get_global_size_x(void) __asm("llvm.r600.read.global.size.x");
4 uint __clc_amdgcn_get_global_size_y(void) __asm("llvm.r600.read.global.size.y");
5 uint __clc_amdgcn_get_global_size_z(void) __asm("llvm.r600.read.global.size.z");
7 _CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) {
8 switch (dim) {
9 case 0:
10 return __clc_amdgcn_get_global_size_x();
11 case 1:
12 return __clc_amdgcn_get_global_size_y();
13 case 2:
14 return __clc_amdgcn_get_global_size_z();
15 default:
16 return 1;