summaryrefslogtreecommitdiff
path: root/kernels/compiler_fdiv2rcp.cl
blob: 99e0005eb784a0b9e1151e45e925bdf7720a6492 (plain)
1
2
3
4
5
6
7
8
kernel void compiler_fdiv2rcp(global float *src, global float *dst) {
  int i = get_global_id(0);
  float tmp = src[i];
  dst[i*4] = 1.0f/tmp;
  dst[i*4+1] = (float)i/tmp;
  dst[i*4+2] = 2.0f/tmp;
  dst[i*4+3] = 3.0f/tmp;
};