1#include <clc/clc.h>
2
3_CLC_DEF _CLC_OVERLOAD uint get_group_id(uint dim) {
4  switch (dim) {
5  case 0:
6    return __builtin_r600_read_tgid_x();
7  case 1:
8    return __builtin_r600_read_tgid_y();
9  case 2:
10    return __builtin_r600_read_tgid_z();
11  default:
12    return 1;
13  }
14}
15