Hello
I’m using the standard random number generator to generate n (~10**5) double precision random numbers between 0 and 1 each step, but this routine is the slowest part of the code (and the only one which runs on CPU) due to the communication between host and device.
Could you reccomend me another way to generate random numbers?
I think I could send the seed to the GPU and the generate all the numbers in GPU but I don’t know how to do it.
Simplest implementation of my code bellow:
/****************************************************************************/
for(int i=0; i<n; i++) Ran[i] = RND1; //n double precision random number in CPU
cudaMemcpy(Ran_d,Ran,nsizeof(double),cudaMemcpyHostToDevice) //Sending n double random number to GPU
/***************************************************************************/
Thanks, this is my first post