title: Loop with strides in OpenCL
body: <p>If I am having a for loop in c++ with some stride, how can I parallelized it in OpenCL kernel. </p>
  
  <p>For example:</p>
  
  <pre><code>for(int i=0;i&lt;100;i++4)
     for(int j=0;j&lt;60;j++4)
      {
         a[i]= b[j]+2;
      }
  </code></pre>
  
  <p>In OpenCL, If I want to parallelize the loops, I can think of using <strong>"/"</strong> or <strong>"%"</strong>, but Is there an other solution?
  I am thinking something like this:</p>
  
  <pre><code>int id1= get_global_id(0);
  int id2= get_global_id(1);
  
  if((id1%4==0) &amp;&amp; (id2%4==0))
   {
     a[id1] = b[id2]+2;
   }
  </code></pre>
  
  <p>This is just an example, as I want to know, how can work with the stride. Is there any other way?</p>