title: Is there any way of making a particular thread to wait for other threads upon some condition in OpenCL kernel
body: <pre>
  
      __kernel
      void example(__global int *a, __global int *dependency, uint cols)
      {
          int j = genter code hereet_global_id(0);
          int i = get_global_id(1);
          if(i > 0 && j > 0)
          {
              while(1) 
          {
             test = 1;                
              }
              //Wait for the dependents
  
          -----------------------------
  
          --------------------------
          }
      }
  
  </pre>
  
  <p>In the above kernel code why the while loop is just skipped in all the threads with out infinitely looping. Any ideas on this. 
  I'm working on some interesting problem which requires a thread to wait for some other threads to finish based on some criteria but every time while of above or while(wait_condition) is skipped when it is being run on GPU.</p>
  
  <p>Is there any other way of making a particular thread to wait for the other threads in OpenCL kernel on GPU?</p>
  
  <p>Thanks in advance!</p>