summaryrefslogtreecommitdiff
path: root/kernels/builtin_sub_group_size.cl
blob: 1e034bb55588add925d1ff9a552c571165d6e83f (plain)
1
2
3
4
5
6
7
__kernel void builtin_sub_group_size(global int *dst)
{
  int lid = get_local_linear_id();
  int lsz = get_local_size(0) * get_local_size(1) * get_local_size(2);
  int gid = lid + lsz*(get_num_groups(1) * get_num_groups(0) * get_group_id(2) + get_num_groups(0) * get_group_id(1) + get_group_id(0));
  dst[gid] = get_sub_group_size();
}