title: Parallelization in CUDA, assigning threads to each column
body: <p>Say I have a 1D array converted from a MxN 2D matrix, and I want to parallelize each column and do some operations. How do I assign a thread to each column?</p>
  
  <p>For example, if I have a 3x3 matrix:</p>
  
  <pre><code>1  2  3
  
  4  5  6
  
  7  8  9
  </code></pre>
  
  <p>And I want to add each number in the column depending on the column # (so 1st column will add 1, 2nd will add 2....), it then becomes:</p>
  
  <pre><code>1+1   2+1   3+1
  
  4+2   5+2   6+2
  
  7+3   8+3   9+3
  </code></pre>
  
  <p>How do I do this in CUDA?  I know how to assign threads to all the elements in the array but I don't know how to assign thread to each column. So, what I want is to send each column (1 , 2  ,3 )  ( 4 , 5 ,6 ) (7 , 8 ,9) and do the operation.</p>