Search code examples
cudathrust

Can 'Thrust' generate random numbers on the device


Does anybody know if the CUDA library 'Thrust' can generate random numbers on the device? I've seen from the example codes that it can do it on the host...But Thats no good for me really. Cheers in advance Jack


Solution

  • Yes, Thrust has device random generator. See Monte Carlo example provided by Thrust team.