Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Random Number Generator in CUDA

Tags:

random

cuda

prng

I've struggled with this all day, I am trying to get a random number generator for threads in my CUDA code. I have looked through all forums and yes this topic comes up a fair bit but I've spent hours trying to unravel all sorts of codes to no avail. If anyone knows of a simple method, probably a device kernel that can be called to returns a random float between 0 and 1, or an integer that I can transform I would be most grateful.

Again, I hope to use the random number in the kernel, just like rand() for instance.

Thanks in advance

like image 663
zenna Avatar asked May 08 '09 02:05

zenna


1 Answers

For anyone interested, you can now do it via cuRAND.

like image 179
Kostis Avatar answered Sep 19 '22 17:09

Kostis