Mercurial > hg > CbC > CbC_llvm
annotate libclc/amdgcn/lib/workitem/get_num_groups.cl @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 2e18cbf3894f |
rev | line source |
---|---|
150 | 1 #include <clc/clc.h> |
2 | |
3 uint __clc_amdgcn_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x"); | |
4 uint __clc_amdgcn_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y"); | |
5 uint __clc_amdgcn_get_num_groups_z(void) __asm("llvm.r600.read.ngroups.z"); | |
6 | |
7 _CLC_DEF size_t get_num_groups(uint dim) | |
8 { | |
9 switch (dim) { | |
10 case 0: return __clc_amdgcn_get_num_groups_x(); | |
11 case 1: return __clc_amdgcn_get_num_groups_y(); | |
12 case 2: return __clc_amdgcn_get_num_groups_z(); | |
13 default: return 1; | |
14 } | |
15 } |