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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 #include <clc/clc.h>
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 uint __clc_amdgcn_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x");
anatofuz
parents:
diff changeset
4 uint __clc_amdgcn_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y");
anatofuz
parents:
diff changeset
5 uint __clc_amdgcn_get_num_groups_z(void) __asm("llvm.r600.read.ngroups.z");
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 _CLC_DEF size_t get_num_groups(uint dim)
anatofuz
parents:
diff changeset
8 {
anatofuz
parents:
diff changeset
9 switch (dim) {
anatofuz
parents:
diff changeset
10 case 0: return __clc_amdgcn_get_num_groups_x();
anatofuz
parents:
diff changeset
11 case 1: return __clc_amdgcn_get_num_groups_y();
anatofuz
parents:
diff changeset
12 case 2: return __clc_amdgcn_get_num_groups_z();
anatofuz
parents:
diff changeset
13 default: return 1;
anatofuz
parents:
diff changeset
14 }
anatofuz
parents:
diff changeset
15 }