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

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