mmizzle9 / cudpp

Automatically exported from code.google.com/p/cudpp
Other
0 stars 0 forks source link

Modify rand seed generation #29

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Current rand seed generation only uses a basic seed XOR'd with the
threadIdx and blockIdx.  A more clever way would be to use an LCG. 
Original e-mail suggesting the change:

From Thomas Bradley:
The threadIdx and blockIdx are 16-bit quantities and even fewer bits will
actually be non-zero, therefore you are really only changing the low bits
of your seed. It may be more robust to use an LCG to generate the “input”
fields, for example a=69069 m=32 is easy and not a bad LCG:

state = (state * 69069) & 0xffffffffUL; return state;

Where state is initialized to the seed (combined somehow with the threadIdx
and blockIdx).

Original issue reported on code.google.com by Solgood...@gmail.com on 13 Jul 2009 at 2:57

GoogleCodeExporter commented 8 years ago

Original comment by harr...@gmail.com on 20 Jan 2010 at 8:24

GoogleCodeExporter commented 8 years ago
Stan, are you still planning to implement this?  I'm lowering priority and 
pushing to release 2.1.

Original comment by harr...@gmail.com on 6 Jul 2011 at 2:33