Guest User

Untitled

a guest
Jun 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. __kernel void foo(__global float* a, __global float* b, __global float* c)
  2. {
  3.     unsigned int i = get_global_id(0);
  4.     float temp;
  5.     for(int j = 0; j < 1024; ++j)
  6.         temp += cos(sin(a[i])*b[i])*a[i] + b[i];
  7.     c[i] = temp/1024.0f;
  8. }
Add Comment
Please, Sign In to add comment