Commit 7abc9fdb authored by Uldis Locans's avatar Uldis Locans
Browse files

cuda random number initialization - same seed different sequence for each state

parent e8386869
...@@ -8,7 +8,7 @@ __global__ void initcuRandState(curandState *state, int size, int seed = 0) { ...@@ -8,7 +8,7 @@ __global__ void initcuRandState(curandState *state, int size, int seed = 0) {
int idx = blockIdx.x * blockDim.x + threadIdx.x; int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < size) { if (idx < size) {
curand_init(seed + idx, 0, 0, &state[idx]); curand_init(seed, idx, 0, &state[idx]);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment