Why is there no rand() ind cuda?

Is there a reason why there isn’t any function like rand() in cuda. I could imagine that there is a lot of people that could use the ability to generate a random number on the spot and not generate them in seriel or something similar.

or is there any one that know of a implementation of a function that can be called like rand()?


that’s a rand48() implementation

under this license: http://www-old.amolf.nl/~vanmeel/mdgpu/licence.html

thrust::default_random_engine works like rand. Here’s an example.

Thanks a lot… I’ll look into those…