summaryrefslogtreecommitdiff
path: root/backend/kernels/loop2.cl
blob: 04997aeb9f8e55be664d3c60ae17b141a4f4d918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "stdlib.h"

struct big { int x[10]; };

__kernel void add(__global int *dst, unsigned int x, struct big b)
{
  for (int i = 0; i < x; ++i) {
    if (dst[i+1] > 0)
      dst[i]++;
    else
      dst[i] += 2;
  }
}