Commit 3a74d6cd authored by Uldis Locans's avatar Uldis Locans
Browse files

init randoms - each thread gets same seed but different sequence

parent b3a12e02
......@@ -8,7 +8,7 @@ __global__ void initcuRandState(curandState *state, int size, int seed = 0) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
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