Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Cannot find a way to generate random numbers in CUDA device code continously for use within computation [duplicate]

$
0
0

This question already has an answer here:

I am trying to write a raytracer accelerated with CUDA, but I need to be able to generate random numbers.

I've been searching through the internet to find a way to generate random floats on demand within device code much like the rand() function of c++ but the only possible solutions I find are separate kernel calls that generate N numbers and then get copied back to host memory, which is not a possible solution for me sadly. If anyone knows a way to make this kind of RNG work, I'd much appreciate if you share it with me.


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>