summaryrefslogtreecommitdiff
path: root/kernels/compiler_argument_structure_select.cl
blob: 295acf48ee400fd50a95b91946c94273ded2bd3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
typedef struct {
  int  offset;
  int  threshold0;
  int  threshold1;
}hop;

__kernel void compiler_argument_structure_select(__global int *dst, hop h)
{
  int i = get_global_id (0);
  int threshold=0;
  if (i == 0)  {
    threshold = h.threshold0;
  } else {
    threshold = h.threshold1;
  }
  dst[i] = threshold;
}