I would like to generate random numbers in my __device__ function, and keep it in my int Board[500] , I found some examples , but they used some type named curandState. I only need a function like a rand() in C++.
I would like to generate random numbers in my __device__ function, and keep it
Share
here is my code , I have N3[40000] array in my device memory , I generate some random numbers in my kernel working for one thread (I mean this “kernel <<<1,1>>> … “) , then I copy it to my N2[40000] from CPU, and print it ,so here is the code