From 3a74d6cdee6eeb478ccc55873ce77844830a217b Mon Sep 17 00:00:00 2001 From: Uldis Locans Date: Mon, 28 Nov 2016 16:23:29 +0100 Subject: [PATCH] init randoms - each thread gets same seed but different sequence --- src/CUDA/CudaBase.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CUDA/CudaBase.cu b/src/CUDA/CudaBase.cu index f352cf2..03fa327 100644 --- a/src/CUDA/CudaBase.cu +++ b/src/CUDA/CudaBase.cu @@ -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]); } }