title: Generating random number within Cuda kernel in a varying range
body: <p>I am trying to generate random number random numbers within the cuda kernel. I wish to generate the random numbers from uniform distribution and in the integer form, starting from 1 up to 8. The random numbers would be different for each of the threads. The range up to which random number can be generated would also vary from one thread to another. The maximum of the range in one thread might be as low as 2 or in the other thread it can be high as 8, but not higher than that. So, I am providing an example below of how I want the numbers to get generated : </p>
  
  <pre><code>In thread#1 --&gt; maximum of the range is 2 and so the random number should be between 1 and 2
  In thread#2 --&gt; maximum of the range is 6  and so the random number should be between 1 and 6
  In thread#3 --&gt; maximum of the range is 5 and so the random number should be between 1 and 5
  </code></pre>
  
  <p>and so on...</p>