A simple parallel random number generator

Press the button to get random vectors in parallel.

The linear congruential random number generator kernel

  __kernel void kRand(global uint* rand ){
    int x = get_global_id(0);
    rand[x] = 1664525u*rand[x] + 1013904223u;

See also GPU Gems 3. Efficient Random Number Generation and Application Using CUDA.

WebCL Demos     updated 8 May 2011