Interaction between thread Lattice computing

Hello

I am now writing a program that agent in my lattice interact each other.

For instance,

1.000 1.000 0.000 -1.000 0.000 1.000 1.000 1.000 -1.000 

1.000 -1.000 1.000 1.000 1.000 1.000 1.000 0.000 1.000 

0.000 0.000 1.000 -1.000 1.000 0.000 0.000 0.000 1.000 

-1.000 -1.000 0.000 0.000 0.000 0.000 0.000 -1.000 0.000 

-1.000 -1.000 1.000 0.000 1.000 -1.000 0.000 0.000 -1.000 

0.000 -1.000 1.000 0.000 1.000 1.000 -1.000 -1.000 0.000 

-1.000 1.000 1.000 1.000 0.000 0.000 1.000 1.000 -1.000 

-1.000 0.000 1.000 0.000 1.000 -1.000 1.000 0.000 1.000 

0.000 -1.000 0.000 1.000 1.000 -1.000 -1.000 0.000 0.000

In CPU version. I used to malloc two lists of +1 and -1 then

shuffle +1, and -1 list then pair them together.

Now my focus is GPU version. I read “CUDA C PROGRAMMING GUIDE”, but

I can not find any function that allow element randomly pair them together.

Do you have any suggestion ?

Any help would be appreciated.

I’m not sure what function you’re looking for. A random number generator? If so look for the CURAND library.

Thank you for your attention.

Already considered it.
I got race condition and some pair are unable to coupling.