MersenneTwister application

Good afternoon!

Has looked as example Cuda SDK MersenneTwister works, has found that on an exit of function RandomGPU the file d_Random in regular intervals distributed random numbers turns out.

I need to alter here such example written on Delphi, under Cuda:

(A piece on Delphi)

Randomize_MT19937;// - Mersenne-Twister function generating new initial values at program start for i: = 0 to 999 do
Mas [i]: = Float_MT19937 // - function Mersenne-Twister also we generate number of type Float;
until (Mas [i] <0.5)
Mas [i]: = Sqr (Mas [i]); - it is erected number in a square


  1. Whether probably such to make on Cuda?
  2. How to make the such:
    To generate a array of random numbers d_Random, to use it as soon as numbers will end to generate a new array d_Random, and such that numbers in both files would have one uniform distribution, the second d_Random would be continuation of the first?

Thanks !!!