I\'m looking to get a random number in OpenCL. It doesn\'t have to be real random or even that random. Just something simple and quick.
I see there is a ton of rea
GPU don't have good sources of randomness, but this can be easily overcome by seeding a kernel with a random seed from the host. After that, you just need an algorithm that can work with a massive number of concurrent threads.
This link describes a Mersenne Twister implementation using OpenCL: Parallel Mersenne Twister. You can also find an implementation in the NVIDIA SDK.