Advertisement
Guest User

Untitled

a guest
May 4th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. __kernel void Add(__global int* pA, __global int* pB, __global int* pC)
  2. {
  3. const int x = get_global_id(0);
  4. const int y = get_global_id(1);
  5. const int width = get_global_size(0);
  6.  
  7. const int id = y * width + x;
  8.  
  9. pC[id] = pA[id] + pB[id];
  10. printf(pC[id]);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement