cuda for Monte Carlo method