summaryrefslogtreecommitdiff
path: root/kernels/compiler_sub_group_any.cl
blob: 15702dbdfe8cd9085e07a4292c31d991fa8c63b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
__kernel void compiler_sub_group_any(global int *src, global int *dst)
{
  int i = get_global_id(0);

  if (i % 2 == 1) {
    if (sub_group_any(src[i] == 5) || sub_group_any(src[i] == 9))
      dst[i] = 1;
    else if (sub_group_any(src[i] == 6))
      dst[i] = 0;
    else
      dst[i] = 2;
  }
  else
    dst[i] = 3;
}