Hi, I am learning Cuda and trying to convert an existing program to GPU runable. The program is basically a Monte Carlo program but each thread needs to update the result after during computation.
My question is: is there a potential conflict if different threads trying to accumulate values to the same global variable? If yes, how to avoid the problem. I am thinking setting up the result variable for each individual thread but this method will consume a lot of memory space. Is there a better solution?
Thanks a lot!