SHARE
TWEET

Untitled

a guest Dec 11th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. __kernel void dividers_par(__global int *N, __global int *numDividers)
  2. {
  3.       //*numDividers = 0;
  4.         int idx = get_global_id(0)+1;
  5.         //printf("\n");
  6.         if (idx <= (*N))
  7.         {
  8.             if ((*N) % idx == 0)
  9.             {
  10.                  //printf("%lli ", idx);
  11.                 (*numDividers)++;   // Я знаю что эта хуйня не атомарная, но для теста надо хоть чё-то иначе ошибка -11
  12.          }
  13.     }
  14.  
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top